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:
niksedk 2013-02-18 19:31:11 +00:00
parent b5784734e6
commit bb35e32fea

View File

@ -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)