A bit more for #5582

This commit is contained in:
niksedk 2021-12-09 17:45:34 +01:00
parent 1148d30e39
commit 79d7c417d4
2 changed files with 9 additions and 2 deletions

View File

@ -18,6 +18,8 @@
* FIXED: * FIXED:
* Fix for generating empty waveform for online videos - thx OmrSi * Fix for generating empty waveform for online videos - thx OmrSi
* Fix for finding frame rate in some mp4 files - thx OmrSi * Fix for finding frame rate in some mp4 files - thx OmrSi
* Fix typo for middle/center in WebVTT properties form defaults - thx koitsu
* Fix issue with TTML 1.0 + favorite + ext change - thx OmrSi
3.6.4 (3rd December 2021) 3.6.4 (3rd December 2021)

View File

@ -66,9 +66,14 @@ namespace Nikse.SubtitleEdit.Core.Common
public static SubtitleFormat GetSubtitleFormatByFriendlyName(string friendlyName) public static SubtitleFormat GetSubtitleFormatByFriendlyName(string friendlyName)
{ {
if (friendlyName.IndexOf('(') > 0)
{
friendlyName = friendlyName.Substring(0, friendlyName.IndexOf('(')).TrimEnd();
}
foreach (var format in SubtitleFormat.AllSubtitleFormats) foreach (var format in SubtitleFormat.AllSubtitleFormats)
{ {
if (format.FriendlyName == friendlyName || format.Name == friendlyName) if (format.Name == friendlyName)
{ {
return format; return format;
} }