From f47a0722cfb063891e0e3d866b3e65173f0ca995 Mon Sep 17 00:00:00 2001 From: nilaoda Date: Mon, 16 Dec 2024 23:07:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96Init=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=8A=A0=E5=AF=86=E5=88=A4=E6=96=AD=20(#562)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 兼容了非标准的m3u8, 详情请看issue #550 --- src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs | 2 +- src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs | 2 +- src/N_m3u8DL-RE/DownloadManager/SimpleLiveRecordManager2.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs b/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs index 2425d7a..010ef3e 100644 --- a/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs +++ b/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs @@ -17,7 +17,7 @@ namespace N_m3u8DL_RE.CommandLine; internal static partial class CommandInvoker { - public const string VERSION_INFO = "N_m3u8DL-RE (Beta version) 20241203"; + public const string VERSION_INFO = "N_m3u8DL-RE (Beta version) 20241216"; [GeneratedRegex("((best|worst)\\d*|all)")] private static partial Regex ForStrRegex(); diff --git a/src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs b/src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs index 7947394..b9333eb 100644 --- a/src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs +++ b/src/N_m3u8DL-RE/DownloadManager/SimpleDownloadManager.cs @@ -177,7 +177,7 @@ internal class SimpleDownloadManager // 从文件读取KEY await SearchKeyAsync(currentKID); // 实时解密 - if (streamSpec.Playlist.MediaInit.IsEncrypted && DownloaderConfig.MyOptions.MP4RealTimeDecryption && !string.IsNullOrEmpty(currentKID) && StreamExtractor.ExtractorType != ExtractorType.MSS) + if ((streamSpec.Playlist.MediaInit.IsEncrypted || !string.IsNullOrEmpty(currentKID)) && DownloaderConfig.MyOptions.MP4RealTimeDecryption && !string.IsNullOrEmpty(currentKID) && StreamExtractor.ExtractorType != ExtractorType.MSS) { var enc = result.ActualFilePath; var dec = Path.Combine(Path.GetDirectoryName(enc)!, Path.GetFileNameWithoutExtension(enc) + "_dec" + Path.GetExtension(enc)); diff --git a/src/N_m3u8DL-RE/DownloadManager/SimpleLiveRecordManager2.cs b/src/N_m3u8DL-RE/DownloadManager/SimpleLiveRecordManager2.cs index f9c66eb..65112dd 100644 --- a/src/N_m3u8DL-RE/DownloadManager/SimpleLiveRecordManager2.cs +++ b/src/N_m3u8DL-RE/DownloadManager/SimpleLiveRecordManager2.cs @@ -211,7 +211,7 @@ internal class SimpleLiveRecordManager2 // 从文件读取KEY await SearchKeyAsync(currentKID); // 实时解密 - if (streamSpec.Playlist.MediaInit.IsEncrypted && DownloaderConfig.MyOptions.MP4RealTimeDecryption && !string.IsNullOrEmpty(currentKID) && StreamExtractor.ExtractorType != ExtractorType.MSS) + if ((streamSpec.Playlist.MediaInit.IsEncrypted || !string.IsNullOrEmpty(currentKID)) && DownloaderConfig.MyOptions.MP4RealTimeDecryption && !string.IsNullOrEmpty(currentKID) && StreamExtractor.ExtractorType != ExtractorType.MSS) { var enc = result.ActualFilePath; var dec = Path.Combine(Path.GetDirectoryName(enc)!, Path.GetFileNameWithoutExtension(enc) + "_dec" + Path.GetExtension(enc));