You've already forked N_m3u8DL-CLI
mirror of
https://github.com/nilaoda/N_m3u8DL-CLI
synced 2025-09-09 09:20:52 +02:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bc349b8977 |
@@ -30,8 +30,8 @@ namespace N_m3u8DL_CLI
|
||||
|
||||
|
||||
/*===============================================================================*/
|
||||
static string nowVer = "2.4.1";
|
||||
static string nowDate = "20191130";
|
||||
static string nowVer = "2.4.2";
|
||||
static string nowDate = "20191216";
|
||||
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)
|
||||
{
|
||||
|
@@ -203,6 +203,10 @@ namespace N_m3u8DL_CLI.NetCore
|
||||
/// - 增加disableIntegrityCheck选项
|
||||
/// 2019年10月24日
|
||||
/// - 捕获Ctrl+C退出,移动光标到正确位置
|
||||
/// 2019年11月30日
|
||||
/// - 完善芒果TV请求头的自动添加
|
||||
/// 2019年12月16日
|
||||
/// - 处理文件名特殊字符
|
||||
/// </summary>
|
||||
///
|
||||
|
||||
@@ -392,7 +396,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