From 019f403339df49d5ffdc777c32b383e1d761184b Mon Sep 17 00:00:00 2001 From: nilaoda Date: Wed, 12 Apr 2023 14:03:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20#150?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/N_m3u8DL-RE.Common/Entity/WebVttSub.cs | 7 +++++++ src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/N_m3u8DL-RE.Common/Entity/WebVttSub.cs b/src/N_m3u8DL-RE.Common/Entity/WebVttSub.cs index 3bff876..6e9c027 100644 --- a/src/N_m3u8DL-RE.Common/Entity/WebVttSub.cs +++ b/src/N_m3u8DL-RE.Common/Entity/WebVttSub.cs @@ -190,6 +190,13 @@ namespace N_m3u8DL_RE.Common.Entity 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(',', '.'); var ms = Convert.ToInt32(str.Split('.').Last()); var o = str.Split('.').First(); diff --git a/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs b/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs index b1a7ac7..ed4b480 100644 --- a/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs +++ b/src/N_m3u8DL-RE/CommandLine/CommandInvoker.cs @@ -18,7 +18,7 @@ namespace N_m3u8DL_RE.CommandLine { 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)")] private static partial Regex ForStrRegex();