Skip to content

Commit

Permalink
fix #665 #661
Browse files Browse the repository at this point in the history
  • Loading branch information
nilaoda committed May 26, 2022
1 parent 606f218 commit 2ee9ab2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion N_m3u8DL-CLI/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Global
/*===============================================================================*/
static Version ver = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
static string nowVer = $"{ver.Major}.{ver.Minor}.{ver.Build}";
static string nowDate = "20220524";
static string nowDate = "20220526";
public static void WriteInit()
{
Console.WriteLine($"N_m3u8DL-CLI version {nowVer} 2018-2022");
Expand Down
8 changes: 6 additions & 2 deletions N_m3u8DL-CLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,12 @@ static void Main(string[] args)
{
if (args[0].ToLower().StartsWith("m3u8dl:"))
{
var valueBytes = Convert.FromBase64String(args[0].Substring(7));
var cmd = Encoding.UTF8.GetString(valueBytes);
var base64 = args[0].Replace("m3u8dl://", "").Replace("m3u8dl:", "");
var cmd = "";
try { cmd = Encoding.UTF8.GetString(Convert.FromBase64String(base64)); }
catch (FormatException) { cmd = Encoding.UTF8.GetString(Convert.FromBase64String(base64.TrimEnd('/'))); }
//修正工作目录
Environment.CurrentDirectory = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);
args = Global.ParseArguments(cmd).ToArray(); //解析命令行
}
else if (args[0] == "--registerUrlProtocol")
Expand Down
4 changes: 2 additions & 2 deletions N_m3u8DL-CLI/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyFileVersion("3.0.0.0")]
[assembly: AssemblyVersion("3.0.1.0")]
[assembly: AssemblyFileVersion("3.0.1.0")]

0 comments on commit 2ee9ab2

Please sign in to comment.