mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-23 03:33:18 +01:00
Working on load of ASS with wrong style version in header...
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1636 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
b5784734e6
commit
bb35e32fea
@ -47,13 +47,23 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
if (!string.IsNullOrEmpty(fileName) && fileName.ToLower().EndsWith(".ass") && !all.Contains("[V4 Styles]"))
|
||||
{
|
||||
}
|
||||
else if (!all.Contains("[V4+ Styles]"))
|
||||
else if (!all.ToLower().Contains("dialogue:"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (!all.Contains("[V4+ Styles]") && new SubStationAlpha().IsMine(lines, fileName))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
LoadSubtitle(subtitle, lines, fileName);
|
||||
return subtitle.Paragraphs.Count > _errorCount;
|
||||
if (subtitle.Paragraphs.Count > _errorCount)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(subtitle.Header))
|
||||
subtitle.Header = subtitle.Header.Replace("[V4 Styles]", "[V4+ Styles]");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override string ToText(Subtitle subtitle, string title)
|
||||
|
Loading…
Reference in New Issue
Block a user