Skip to content

Commit 1a52a7a

Browse files
authored
优化Init文件加密判断 (#562)
兼容了非标准的m3u8, 详情请看issue #550
1 parent ea9de55 commit 1a52a7a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace N_m3u8DL_RE.CommandLine;
1717

1818
internal static partial class CommandInvoker
1919
{
20-
public const string VERSION_INFO = "N_m3u8DL-RE (Beta version) 20241203";
20+
public const string VERSION_INFO = "N_m3u8DL-RE (Beta version) 20241216";
2121

2222
[GeneratedRegex("((best|worst)\\d*|all)")]
2323
private static partial Regex ForStrRegex();

src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ private async Task<bool> DownloadStreamAsync(StreamSpec streamSpec, ProgressTask
177177
// 从文件读取KEY
178178
await SearchKeyAsync(currentKID);
179179
// 实时解密
180-
if (streamSpec.Playlist.MediaInit.IsEncrypted && DownloaderConfig.MyOptions.MP4RealTimeDecryption && !string.IsNullOrEmpty(currentKID) && StreamExtractor.ExtractorType != ExtractorType.MSS)
180+
if ((streamSpec.Playlist.MediaInit.IsEncrypted || currentKID?.Length > 0) && DownloaderConfig.MyOptions.MP4RealTimeDecryption && !string.IsNullOrEmpty(currentKID) && StreamExtractor.ExtractorType != ExtractorType.MSS)
181181
{
182182
var enc = result.ActualFilePath;
183183
var dec = Path.Combine(Path.GetDirectoryName(enc)!, Path.GetFileNameWithoutExtension(enc) + "_dec" + Path.GetExtension(enc));

0 commit comments

Comments
 (0)