@cosmetic Added Parsing Library: A dotnet library that "exports" our parsing interface.

This commit is contained in:
Leonardo Galli
2019-02-18 00:09:41 +01:00
parent 9bc50749ae
commit 4015ff08a6
10 changed files with 190 additions and 39 deletions
+6 -1
View File
@@ -142,7 +142,9 @@ namespace NzbDrone.Core.Parser
{
try
{
#if !LIBRARY
Logger.Debug("Parsing language from subtitle file: {0}", fileName);
#endif
var simpleFilename = Path.GetFileNameWithoutExtension(fileName);
var languageMatch = SubtitleLanguageRegex.Match(simpleFilename);
@@ -154,12 +156,15 @@ namespace NzbDrone.Core.Parser
return isoLanguage?.Language ?? Language.Unknown;
}
#if !LIBRARY
Logger.Debug("Unable to parse langauge from subtitle file: {0}", fileName);
#endif
}
catch (Exception ex)
{
#if !LIBRARY
Logger.Debug("Failed parsing langauge from subtitle file: {0}", fileName);
#endif
}
return Language.Unknown;