This commit is contained in:
nilaoda 2023-04-12 14:03:07 +08:00
parent f2468d16d7
commit 019f403339
2 changed files with 8 additions and 1 deletions

View File

@ -190,6 +190,13 @@ namespace N_m3u8DL_RE.Common.Entity
private static TimeSpan ConvertToTS(string str) private static TimeSpan ConvertToTS(string str)
{ {
//17.0s
if (str.EndsWith('s'))
{
double sec = Convert.ToDouble(str[..^1]);
return TimeSpan.FromSeconds(sec);
}
str = str.Replace(',', '.'); str = str.Replace(',', '.');
var ms = Convert.ToInt32(str.Split('.').Last()); var ms = Convert.ToInt32(str.Split('.').Last());
var o = str.Split('.').First(); var o = str.Split('.').First();

View File

@ -18,7 +18,7 @@ namespace N_m3u8DL_RE.CommandLine
{ {
internal partial class CommandInvoker internal partial class CommandInvoker
{ {
public const string VERSION_INFO = "N_m3u8DL-RE (Beta version) 20230406"; public const string VERSION_INFO = "N_m3u8DL-RE (Beta version) 20230412";
[GeneratedRegex("((best|worst)\\d*|all)")] [GeneratedRegex("((best|worst)\\d*|all)")]
private static partial Regex ForStrRegex(); private static partial Regex ForStrRegex();