1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-20 21:54:58 -04:00

Fixed: Subtitle tags from existing subtitle files being lost during rename

Closes #5577
This commit is contained in:
Lars
2023-04-27 05:18:58 +02:00
committed by GitHub
parent 8c50cd061e
commit 3141bf7f9d
3 changed files with 7 additions and 6 deletions
+3 -3
View File
@@ -226,7 +226,7 @@ namespace NzbDrone.Core.Parser
return Language.Unknown;
}
public static IEnumerable<string> ParseLanguageTags(string fileName)
public static List<string> ParseLanguageTags(string fileName)
{
try
{
@@ -235,14 +235,14 @@ namespace NzbDrone.Core.Parser
var languageTags = match.Groups["tags"].Captures.Cast<Capture>()
.Where(tag => !tag.Value.Empty())
.Select(tag => tag.Value.ToLower());
return languageTags;
return languageTags.ToList();
}
catch (Exception ex)
{
Logger.Debug(ex, "Failed parsing language tags from subtitle file: {0}", fileName);
}
return Enumerable.Empty<string>();
return new List<string>();
}
private static List<Language> RegexLanguage(string title)