public static int Plays(this TraktMovie movie)
{
if (WatchedMovies == null)
return 0;
// we may added a play from a real-time scrobble or added a new play from a sync
var watchedMovies = WatchedMovies.Where(m => ((m.Movie.Ids.Trakt == movie.Ids.Trakt) && m.Movie.Ids.Trakt != null) ||
((m.Movie.Ids.Imdb == movie.Ids.Imdb) && m.Movie.Ids.Imdb.ToNullIfEmpty() != null) ||
((m.Movie.Ids.Tmdb == movie.Ids.Tmdb) && m.Movie.Ids.Tmdb != null));
if (watchedMovies == null)
return 0;
return watchedMovies.Sum(m => m.Plays);
}