mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-26 05:02:36 +01:00
Update change + minor refact
This commit is contained in:
parent
0590f7d804
commit
1ccf288598
@ -6,11 +6,13 @@
|
||||
* Add new subtitle (Excel) format - thx Jecy
|
||||
* Add shortcuts for Tools menu items Split/Append/Join - thx z3us
|
||||
* Add shortcuts for "Merge line with same text/time-code" - thx Mike
|
||||
* Add shortcuts "Set end and pause" + "Export to PAC" - thx Milenko
|
||||
* Add shortcut for File - Compare
|
||||
* Add context menu item for "Set default fixes" in FCE
|
||||
* Cmd line convert use header from EBU STL file - thx malashin
|
||||
* Add "ocrengine" parameter to cmd line convert
|
||||
* Add "Export to FCP+image" in OCR window - thx Marko
|
||||
* Add alignment support for .scc files - thx madprogramer
|
||||
* IMPROVED:
|
||||
* Update Bulgarian translation - thx KalinM
|
||||
* Update Hungarian translation - thx Zityi
|
||||
|
@ -455,7 +455,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
|
||||
var sb = new StringBuilder();
|
||||
int count = 0;
|
||||
foreach (string line in lines)
|
||||
foreach (var line in lines)
|
||||
{
|
||||
if (count < 4)
|
||||
{
|
||||
@ -468,19 +468,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
|
||||
private static bool IsAllOkay(List<string> lines)
|
||||
{
|
||||
if (lines.Count > 4)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < lines.Count; i++)
|
||||
{
|
||||
if (lines[i].Length > 32)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return lines.Count <= 4 && lines.All(line => line.Length <= 32);
|
||||
}
|
||||
|
||||
private static int GetLastIndexOfSpace(string s, int endCount)
|
||||
@ -811,10 +799,10 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
|
||||
if (columnRest == 3)
|
||||
{
|
||||
return code + " " + code + " 9723 9723 ";
|
||||
return $"{code} {code} 9723 9723 ";
|
||||
}
|
||||
|
||||
return code + " " + code + " ";
|
||||
return $"{code} {code} ";
|
||||
}
|
||||
|
||||
private string ToTimeCode(double totalMilliseconds)
|
||||
|
@ -2,19 +2,17 @@
|
||||
|
||||
namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
{
|
||||
|
||||
public class ScenaristClosedCaptionsDropFrame : ScenaristClosedCaptions
|
||||
{
|
||||
//00:01:00:29 9420 9420 94ae 94ae 94d0 94d0 4920 f761 7320 ... semi colon (instead of colon) before frame number is used to indicate drop frame
|
||||
private const string TimeCodeRegEx = @"^\d+:\d\d:\d\d[;,]\d\d\t";
|
||||
private static readonly Regex Regex = new Regex(TimeCodeRegEx, RegexOptions.Compiled);
|
||||
protected override Regex RegexTimeCodes => Regex;
|
||||
public override string Name => "Scenarist Closed Captions Drop Frame";
|
||||
|
||||
public ScenaristClosedCaptionsDropFrame()
|
||||
{
|
||||
DropFrame = true;
|
||||
}
|
||||
|
||||
public override string Name => "Scenarist Closed Captions Drop Frame";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user