2016-12-23 21:45:24 +00:00
|
|
|
|
namespace NzbDrone.Core.Parser
|
2014-09-01 23:37:59 +00:00
|
|
|
|
{
|
|
|
|
|
public static class SceneChecker
|
|
|
|
|
{
|
|
|
|
|
//This method should prefer false negatives over false positives.
|
2014-09-02 22:12:13 +00:00
|
|
|
|
//It's better not to use a title that might be scene than to use one that isn't scene
|
2014-09-01 23:37:59 +00:00
|
|
|
|
public static bool IsSceneTitle(string title)
|
|
|
|
|
{
|
|
|
|
|
if (!title.Contains(".")) return false;
|
|
|
|
|
if (title.Contains(" ")) return false;
|
|
|
|
|
|
|
|
|
|
var parsedTitle = Parser.ParseTitle(title);
|
2015-01-27 05:57:07 +00:00
|
|
|
|
|
|
|
|
|
if (parsedTitle == null ||
|
|
|
|
|
parsedTitle.ReleaseGroup == null ||
|
|
|
|
|
parsedTitle.Quality.Quality == Qualities.Quality.Unknown ||
|
2015-10-03 17:45:26 +00:00
|
|
|
|
string.IsNullOrWhiteSpace(parsedTitle.SeriesTitle))
|
2015-01-27 05:57:07 +00:00
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2014-09-01 23:37:59 +00:00
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|