Skip to content

Commit 9a7f5ec

Browse files
committed
修复增加EXT-X-KEY的解析与key下载导致的一个M3U8解析bug
1 parent eb62def commit 9a7f5ec

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ android {
5757
applicationId "com.xm.vbrowser.app"
5858
minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION)
5959
targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)
60-
versionCode 6
61-
versionName "1.5"
60+
versionCode 7
61+
versionName "1.6"
6262

6363

6464
// Specifies the ABI configurations of your native

app/src/main/java/com/xm/vbrowser/app/DownloadManager.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,14 +453,12 @@ private void parseM3u8(String m3u8Url, String newM3u8FileName, String outputPath
453453
hashMap.put("downloadPath", keyPath);
454454
downloadQueue.add(hashMap);
455455
String newLineStr = Pattern.compile("URI=\"(.*?)\"").matcher(lineStr).replaceAll("URI=\"/" + uuidStr + ".key\"");
456-
newM3u8FileContent = newM3u8FileContent+newLineStr+"\n";
457-
continue;
456+
lineStr = newLineStr;
458457
}
459458
if(lineStr.startsWith("#EXT-X-STREAM-INF")){
460459
subFile = true;
461-
newM3u8FileContent = newM3u8FileContent+lineStr+"\n";
462-
continue;
463460
}
461+
newM3u8FileContent = newM3u8FileContent + lineStr + "\n";
464462
}else{
465463
String uuidStr = UUIDUtil.genUUID();
466464
String videoUri = lineStr.trim();

0 commit comments

Comments
 (0)