You've already forked N_m3u8DL-CLI
mirror of
https://github.com/nilaoda/N_m3u8DL-CLI
synced 2025-09-12 19:20:49 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
086fc57958 | ||
![]() |
bc349b8977 |
@@ -152,6 +152,7 @@ namespace N_m3u8DL_CLI
|
||||
//开始调用下载
|
||||
LOGGER.WriteLine("Start Downloading");
|
||||
LOGGER.PrintLine("开始下载文件", LOGGER.Warning);
|
||||
|
||||
//下载MAP文件(若有)
|
||||
try
|
||||
{
|
||||
@@ -225,6 +226,8 @@ namespace N_m3u8DL_CLI
|
||||
if (Global.HadReadInfo == false)
|
||||
{
|
||||
string href = DownDir + "\\Part_" + 0.ToString(partsPadZero) + "\\" + firstSeg["index"].Value<int>().ToString(segsPadZero) + ".ts";
|
||||
if (File.Exists(DownDir + "\\!MAP.ts"))
|
||||
href = DownDir + "\\!MAP.ts";
|
||||
Global.GzipHandler(href);
|
||||
bool flag = false;
|
||||
foreach (string ss in (string[])Global.GetVideoInfo(href).ToArray(typeof(string)))
|
||||
@@ -521,7 +524,7 @@ namespace N_m3u8DL_CLI
|
||||
|
||||
FFmpeg.OutPutPath = Path.Combine(Directory.GetParent(DownDir).FullName, DownName);
|
||||
FFmpeg.ReportFile = driverName + "\\:" + exePath.Remove(0, exePath.IndexOf(':') + 1).Replace("\\", "/") + "/Logs/" + Path.GetFileNameWithoutExtension(LOGGER.LOGFILE) + fflogName;
|
||||
|
||||
|
||||
//合并分段
|
||||
LOGGER.PrintLine("合并分段中...");
|
||||
for (int i = 0; i < PartsCount; i++)
|
||||
|
@@ -30,8 +30,8 @@ namespace N_m3u8DL_CLI
|
||||
|
||||
|
||||
/*===============================================================================*/
|
||||
static string nowVer = "2.4.1";
|
||||
static string nowDate = "20191130";
|
||||
static string nowVer = "2.4.3";
|
||||
static string nowDate = "20191218";
|
||||
public static void WriteInit()
|
||||
{
|
||||
Console.Clear();
|
||||
@@ -77,6 +77,16 @@ namespace N_m3u8DL_CLI
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetValidFileName(string input, string re = ".")
|
||||
{
|
||||
string title = input;
|
||||
foreach (char invalidChar in Path.GetInvalidFileNameChars())
|
||||
{
|
||||
title = title.Replace(invalidChar.ToString(), re);
|
||||
}
|
||||
return title;
|
||||
}
|
||||
|
||||
// parseInt(s, radix)
|
||||
public static int GetNum(string str, int numBase)
|
||||
{
|
||||
@@ -699,6 +709,14 @@ namespace N_m3u8DL_CLI
|
||||
{
|
||||
VIDEO_TYPE = "DV";
|
||||
}
|
||||
else if (res.Contains("Video hevc (Main 10) (dvh1")) //优酷视频杜比视界
|
||||
{
|
||||
VIDEO_TYPE = "DV";
|
||||
}
|
||||
else if (res.Contains("Video hevc (dvh1")) //优酷视频杜比视界
|
||||
{
|
||||
VIDEO_TYPE = "DV";
|
||||
}
|
||||
else if (res.Contains("Video h264"))
|
||||
{
|
||||
VIDEO_TYPE = "H264";
|
||||
|
@@ -279,7 +279,8 @@ namespace N_m3u8DL_CLI
|
||||
//m3u8主体结束
|
||||
else if (line.StartsWith(HLSTags.ext_x_endlist))
|
||||
{
|
||||
parts.Add(segments);
|
||||
if (segments.Count > 0)
|
||||
parts.Add(segments);
|
||||
segments = new JArray();
|
||||
isEndlist = true;
|
||||
}
|
||||
|
@@ -203,6 +203,13 @@ namespace N_m3u8DL_CLI.NetCore
|
||||
/// - 增加disableIntegrityCheck选项
|
||||
/// 2019年10月24日
|
||||
/// - 捕获Ctrl+C退出,移动光标到正确位置
|
||||
/// 2019年11月30日
|
||||
/// - 完善芒果TV请求头的自动添加
|
||||
/// 2019年12月16日
|
||||
/// - 处理文件名特殊字符
|
||||
/// 2019年12月18日
|
||||
/// - 修复m3u8解析bug导致的无法合并问题
|
||||
/// - 增加杜比视界识别场景
|
||||
/// </summary>
|
||||
///
|
||||
|
||||
@@ -392,7 +399,7 @@ namespace N_m3u8DL_CLI.NetCore
|
||||
}
|
||||
if (arguments.Has("--saveName"))
|
||||
{
|
||||
fileName = arguments.Get("--saveName").Next;
|
||||
fileName = Global.GetValidFileName(arguments.Get("--saveName").Next);
|
||||
}
|
||||
if (arguments.Has("--useKeyFile"))
|
||||
{
|
||||
|
Reference in New Issue
Block a user