Пример #1
0
        internal static void SetMovieProperties(TraktMovieSummary movie)
        {
            if (movie == null) return;

            SetProperty("#Trakt.Movie.Id", movie.Ids.Trakt);
            SetProperty("#Trakt.Movie.ImdbId", movie.Ids.Imdb);
            SetProperty("#Trakt.Movie.TmdbId", movie.Ids.Tmdb);
            SetProperty("#Trakt.Movie.Slug", movie.Ids.Slug);
            SetProperty("#Trakt.Movie.Certification", movie.Certification);
            SetProperty("#Trakt.Movie.Overview", movie.Overview.ToNullIfEmpty() == null ? Translation.NoMovieSummary : movie.Overview.RemapHighOrderChars());
            SetProperty("#Trakt.Movie.Released", movie.Released);
            SetProperty("#Trakt.Movie.Language", Translation.GetLanguageFromISOCode(movie.Language));
            SetProperty("#Trakt.Movie.Runtime", movie.Runtime);
            SetProperty("#Trakt.Movie.Tagline", movie.Tagline);
            SetProperty("#Trakt.Movie.Title", movie.Title.RemapHighOrderChars());
            SetProperty("#Trakt.Movie.Trailer", movie.Trailer);
            SetProperty("#Trakt.Movie.Url", string.Format("http://trakt.tv/movies/{0}", movie.Ids.Slug));
            SetProperty("#Trakt.Movie.Year", movie.Year);
            SetProperty("#Trakt.Movie.Genres", TraktGenres.Translate(movie.Genres));
            SetProperty("#Trakt.Movie.InCollection", movie.IsCollected());
            SetProperty("#Trakt.Movie.InWatchList", movie.IsWatchlisted());
            SetProperty("#Trakt.Movie.Plays", movie.Plays());
            SetProperty("#Trakt.Movie.Watched", movie.IsWatched());
            SetProperty("#Trakt.Movie.Rating", movie.UserRating());
            SetProperty("#Trakt.Movie.Ratings.Percentage", movie.Rating.ToPercentage());
            SetProperty("#Trakt.Movie.Ratings.Votes", movie.Votes);
            SetProperty("#Trakt.Movie.Ratings.Icon", (movie.Rating >= 6) ? "love" : "hate");
        }
Пример #2
0
 public static void ShowMovieShouts(TraktMovieSummary movie)
 {
     var images = TmdbCache.GetMovieImages(movie.Ids.Tmdb, true);
     ShowMovieShouts(movie.Title, movie.Year, movie.Ids.Imdb, movie.Ids.Trakt, movie.IsWatched(), TmdbCache.GetMovieBackdropFilename(images), TmdbCache.GetMovieBackdropUrl(images));
 }