Files
Prowlarr/src/NzbDrone.Core/Parser/SceneChecker.cs
T
Devin Buhl 1c086b057a Patch/galileo fixes (#951)
* Update to ParseMovieTitle

* update default server to gmail to relfect other changes
2017-02-28 19:30:23 -05:00

26 lines
813 B
C#

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 scene than 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.ParseMovieTitle(title);
if (parsedTitle == null ||
parsedTitle.ReleaseGroup == null ||
parsedTitle.Quality.Quality == Qualities.Quality.Unknown ||
string.IsNullOrWhiteSpace(parsedTitle.MovieTitle))
{
return false;
}
return true;
}
}
}