mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
parent
f6ceca9175
commit
b0c8aa0a14
@ -1033,6 +1033,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
private static Regex _endsWithTreeDigits = new Regex(@"\d\d\d$");
|
||||
private static bool IsFrames(string timeCode)
|
||||
{
|
||||
if (timeCode.Length == 12 && (timeCode[8] == '.' || timeCode[8] == ',')) // 00:00:08.292 or 00:00:08,292
|
||||
@ -1045,6 +1046,11 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_endsWithTreeDigits.IsMatch(timeCode))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1287,7 +1293,14 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
Configuration.Settings.SubtitleSettings.TimedText10TimeCodeFormatSource = "frames";
|
||||
return new TimeCode(int.Parse(parts[0]), int.Parse(parts[1]), int.Parse(parts[2]), FramesToMillisecondsMax999(int.Parse(parts[3])));
|
||||
}
|
||||
return new TimeCode(int.Parse(parts[0]), int.Parse(parts[1]), int.Parse(parts[2]), parts.Length > 3 ? int.Parse(parts[3]) : 0);
|
||||
|
||||
var hours = int.Parse(parts[0]);
|
||||
if (hours > 99)
|
||||
{
|
||||
hours = 0;
|
||||
}
|
||||
|
||||
return new TimeCode(hours, int.Parse(parts[1]), int.Parse(parts[2]), parts.Length > 3 ? int.Parse(parts[3]) : 0);
|
||||
}
|
||||
|
||||
public override List<string> AlternateExtensions => new List<string> { ".itt", ".dfxp", ".ttml" };
|
||||
|
Loading…
Reference in New Issue
Block a user