Merge pull request #8875 from ivandrofly/file-association

Simplify subtitle file type descriptions
This commit is contained in:
Nikolaj Olsson 2024-10-03 17:05:20 +02:00 committed by GitHub
commit 8398a776a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,45 +54,45 @@ namespace Nikse.SubtitleEdit.Logic
{
if (ext.Equals(".srt", StringComparison.OrdinalIgnoreCase))
{
return "SubRip subtitle file";
return "SubRip";
}
if (ext.Equals(".ass", StringComparison.OrdinalIgnoreCase))
{
return "Advanced Sub Station Alpha subtitle file";
return "Advanced Sub Station Alpha";
}
if (ext.Equals(".dfxp", StringComparison.OrdinalIgnoreCase))
{
return "Distribution Format Exchange Profile subtitle file";
return "Distribution Format Exchange Profile";
}
if (ext.Equals(".ssa", StringComparison.OrdinalIgnoreCase))
{
return "Sub Station Alpha subtitle file";
return "Sub Station Alpha";
}
if (ext.Equals(".sup", StringComparison.OrdinalIgnoreCase))
{
return "Blu-ray PGS subtitle file";
return "Blu-ray PGS";
}
if (ext.Equals(".vtt", StringComparison.OrdinalIgnoreCase))
{
return "Web Video Text Tracks (WebVTT) subtitle file";
return "Web Video Text Tracks (WebVTT)";
}
if (ext.Equals(".smi", StringComparison.OrdinalIgnoreCase))
{
return "SAMI subtitle file";
return "SAMI";
}
if (ext.Equals(".itt", StringComparison.OrdinalIgnoreCase))
{
return "iTunes Timed Text subtitle file";
return "iTunes Timed Text";
}
return $"{ext.TrimStart('.')} subtitle file";
return $"{ext.TrimStart('.')}";
}
internal static void DeleteFileAssociationViaRegistry(string ext, string appName)