Browse Source

部分bug修复

liyuntian 10 months ago
parent
commit
7395170e0d

+ 4 - 4
mcp/src/main/java/com/chuanxia/mcp/service/impl/CdnDoaminServiceImpl.java

@@ -179,7 +179,7 @@ public class CdnDoaminServiceImpl extends ServiceImpl<CdnDomainMapper, CdnDomain
                 String header = request.getHeader("user-agent");
                 String header = request.getHeader("user-agent");
                 UserAgent userAgent = UserAgent.parseUserAgentString(header);
                 UserAgent userAgent = UserAgent.parseUserAgentString(header);
                 CdnUa uaByConfig = getUaByConfig(userAgent);
                 CdnUa uaByConfig = getUaByConfig(userAgent);
-                String ratio = "1024*768";
+                String ratio = "1024x768";
                 if (uaByConfig != null) {
                 if (uaByConfig != null) {
                     //根据配置+网速,生成对应分辨率
                     //根据配置+网速,生成对应分辨率
                     Integer level = uaByConfig.getLevel();
                     Integer level = uaByConfig.getLevel();
@@ -249,7 +249,7 @@ public class CdnDoaminServiceImpl extends ServiceImpl<CdnDomainMapper, CdnDomain
         }
         }
         response.setContentType("text/plain");
         response.setContentType("text/plain");
         response.setHeader("Content-Disposition", "attachment;filename=" + id + ".m3u8");
         response.setHeader("Content-Disposition", "attachment;filename=" + id + ".m3u8");
-        ServletOutputStream out = null;
+        ServletOutputStream out;
         try {
         try {
             out = response.getOutputStream();
             out = response.getOutputStream();
             StringBuilder builder = new StringBuilder();
             StringBuilder builder = new StringBuilder();
@@ -342,8 +342,8 @@ public class CdnDoaminServiceImpl extends ServiceImpl<CdnDomainMapper, CdnDomain
     /**
     /**
      * 根据当前浏览器ua,获取对应配置
      * 根据当前浏览器ua,获取对应配置
      *
      *
-     * @param userAgent
-     * @return
+     * @param userAgent ua信息
+     * @return ua配置信息
      */
      */
     private CdnUa getUaByConfig(UserAgent userAgent) {
     private CdnUa getUaByConfig(UserAgent userAgent) {
         LambdaQueryWrapper<CdnUa> query = Wrappers.lambdaQuery();
         LambdaQueryWrapper<CdnUa> query = Wrappers.lambdaQuery();