1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-27 22:57:09 -04:00

Fixed: Use Nzb title as scene name when available

This commit is contained in:
kayone
2014-09-01 16:37:59 -07:00
committed by Keivan Beigi
parent 17aac81a4d
commit 20287f84ce
13 changed files with 191 additions and 37 deletions
+23
View File
@@ -0,0 +1,23 @@
namespace NzbDrone.Core.Parser
{
public static class SceneChecker
{
//This method should prefer false negatives over false positives.
//It's better not to use a title that might be seen that to use one that isn't scene
public static bool IsSceneTitle(string title)
{
if (!title.Contains(".")) return false;
if (title.Contains(" ")) return false;
var parsedTitle = Parser.ParseTitle(title);
if (parsedTitle == null
|| parsedTitle.ReleaseGroup == null
|| parsedTitle.Quality.Quality == Qualities.Quality.Unknown
|| string.IsNullOrWhiteSpace(parsedTitle.SeriesTitle)) return false;
return true;
}
}
}