static bool CheckRatingOnMovie()
{
if (!TraktSettings.ParentalIgnoreMovieRatingEnabled)
return false;
if (CurrentMediaType != MediaType.Movie)
return false;
if (CurrentMovie == null || string.IsNullOrEmpty(CurrentMovie.Certification))
return false;
string allowedRating = TraktSettings.ParentalIgnoreMovieRating;
switch (CurrentMovie.Certification)
{
case "R":
if (allowedRating == "R") return true;
break;
case "PG-13":
if (allowedRating == "R") return true;
if (allowedRating == "PG-13") return true;
break;
case "PG":
if (allowedRating == "R") return true;
if (allowedRating == "PG-13") return true;
if (allowedRating == "PG") return true;
break;
case "G":
if (allowedRating == "R") return true;
if (allowedRating == "PG-13") return true;
if (allowedRating == "PG") return true;
if (allowedRating == "G") return true;
break;
}
return false;
}