1
mirror of https://github.com/nilaoda/N_m3u8DL-CLI synced 2025-10-09 00:22:13 +02:00

Compare commits

...

9 Commits
2.9.6 ... 2.9.7

Author SHA1 Message Date
nilaoda
8b520d0c19 修正AppleTV逻辑 2021-03-25 23:11:18 +08:00
nilaoda
71d69de51a Update changelog.txt 2021-03-25 22:09:44 +08:00
nilaoda
bc89ead00d 为下载分片增加了自动重试机制(3次) 2021-03-25 22:09:26 +08:00
nilaoda
ae79d6eb3a 优化下载监控 2021-03-25 22:07:04 +08:00
nilaoda
96bd8af883 适配AppleTv资源 2021-03-22 23:18:22 +08:00
nilaoda
89b1e30e0f 修复enableAudioOnly且下载MPD文件时留下冗余(Audio)文件夹的情况 2021-03-22 23:17:09 +08:00
nilaoda
7a741359ab Update README.md 2021-03-04 13:17:07 +08:00
nilaoda
564b6ad291 Update README_ENG.md 2021-03-04 13:12:06 +08:00
nilaoda
a0fc9404f7 Update README.md 2021-03-04 13:11:06 +08:00
7 changed files with 39 additions and 8 deletions

View File

@@ -65,12 +65,14 @@ namespace N_m3u8DL_CLI
{
Global.ShouldStop = true;
cts.Cancel();
timer.Enabled = false;
}
}
else
{
stopCount = 0;
Global.BYTEDOWN = 0;
Global.ShouldStop = false;
}
};
}
@@ -328,7 +330,7 @@ namespace N_m3u8DL_CLI
Count++;
LOGGER.WriteLine(strings.retryCount + Count + " / " + RetryCount);
LOGGER.PrintLine(strings.retryCount + Count + " / " + RetryCount, LOGGER.Warning);
Thread.Sleep(6000);
Thread.Sleep(3000);
DoDownload();
}
}

View File

@@ -34,7 +34,7 @@ namespace N_m3u8DL_CLI
/*===============================================================================*/
static Version ver = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
static string nowVer = $"{ver.Major}.{ver.Minor}.{ver.Build}";
static string nowDate = "20210201";
static string nowDate = "20210325";
public static void WriteInit()
{
Console.Clear();
@@ -104,7 +104,7 @@ namespace N_m3u8DL_CLI
public static string GetWebSource(String url, string headers = "", int TimeOut = 60000)
{
string htmlCode = string.Empty;
for (int i = 0; i < 10; i++)
for (int i = 0; i < 5; i++)
{
try
{
@@ -209,6 +209,7 @@ namespace N_m3u8DL_CLI
}
catch (Exception e) //捕获所有异常
{
LOGGER.WriteLine(e.Message);
LOGGER.WriteLineError(e.Message);
Thread.Sleep(1000); //1秒后重试
continue;
@@ -544,6 +545,8 @@ namespace N_m3u8DL_CLI
/// </summary>
public static void HttpDownloadFile(string url, string path, int timeOut = 20000, string headers = "", long startByte = 0, long expectByte = -1)
{
int retry = 0;
reDownload:
try
{
if (File.Exists(path))
@@ -674,6 +677,12 @@ namespace N_m3u8DL_CLI
{
LOGGER.WriteLineError("DOWN: " + e.Message + " " + url);
try { File.Delete(path); } catch (Exception) { }
if (retry++ < 3)
{
Thread.Sleep(1000);
LOGGER.WriteLineError($"DOWN: AUTO RETRY {retry}/3 " + url);
goto reDownload;
}
}
}

View File

@@ -614,7 +614,7 @@ namespace N_m3u8DL_CLI
}
var content = "";
if (videoPath == "" && audioPath != "")
if ((videoPath == "" && audioPath != "") || Global.VIDEO_TYPE == "IGNORE")
{
return audioPath;
}

View File

@@ -171,7 +171,7 @@ namespace N_m3u8DL_CLI
}
}
//对Disney+修正
//对Disney+修正
if (m3u8Content.Contains("#EXT-X-DISCONTINUITY") && m3u8Content.Contains("#EXT-X-MAP") && M3u8Url.Contains("media.dssott.com/"))
{
Regex ykmap = new Regex("#EXT-X-MAP:URI=\\\".*?BUMPER/[\\s\\S]+?#EXT-X-DISCONTINUITY");
@@ -181,6 +181,17 @@ namespace N_m3u8DL_CLI
}
}
//针对AppleTv修正
if (m3u8Content.Contains("#EXT-X-DISCONTINUITY") && m3u8Content.Contains("#EXT-X-MAP") && M3u8Url.Contains(".apple.com/"))
{
//只取加密部分即可
Regex ykmap = new Regex("(#EXT-X-KEY:[\\s\\S]*?)#EXT-X-DISCONTINUITY");
if (ykmap.IsMatch(m3u8Content))
{
m3u8Content = "#EXTM3U\r\n" + ykmap.Match(m3u8Content).Groups[1].Value + "\r\n#EXT-X-ENDLIST";
}
}
//如果BaseUrl为空则截取字符串充当
if (BaseUrl == "")
{

View File

@@ -330,4 +330,11 @@
2021年3月3日
- 修复M3U8选择音轨/字幕不生效问题
- 外挂音轨时enableAudioOnly可仅下载音频
- 移除气球云支持
- 移除气球云支持
2021年3月15日
- 修复enableAudioOnly且下载MPD文件时留下冗余(Audio)文件夹的情况
2021年3月22日
- 适配AppleTv资源
2021年3月25日
- 优化下载监控
- 为下载分片增加了自动重试机制(3次)

View File

@@ -25,6 +25,7 @@
支持下载m3u8链接或文件为`mp4`或`ts`格式,并提供丰富的命令行选项。
* **不支持**优酷视频解密
* **不支持**气球云视频解密
* 支持`AES-128-CBC`加密自动解密
* 支持多线程下载
* 支持下载限速
@@ -37,7 +38,8 @@
* 支持下载路径为网络驱动器的情况
* 支持下载外挂字幕轨道、音频轨道
* 支持仅合并为音频
* 自动使用系统代理(可禁止)
* 支持设置特定http代理
* 支持自动使用系统代理(默认行为, 可禁止)
* 提供SimpleG简易的`GUI`生成常用参数

View File

@@ -20,7 +20,7 @@ Supports:
* Network driver on Windows OS
* Alternative audio/video track
* Mux without video track
* Auto use system proxy
* Costom HTTP proxy or Use system proxy
* Optimization for Chinese streaming platform
![ScreenShot](https://nilaoda.github.io/N_m3u8DL-CLI/source/images/%E7%9B%B4%E6%8E%A5%E4%BD%BF%E7%94%A8.gif)