Esempio n. 1
0
        internal static void SetShowProperties(TraktShowSummary show)
        {
            if (show == null) return;

            SetProperty("#Trakt.Show.Id", show.Ids.Trakt);
            SetProperty("#Trakt.Show.ImdbId", show.Ids.Imdb);
            SetProperty("#Trakt.Show.TvdbId", show.Ids.Tvdb);
            SetProperty("#Trakt.Show.TmdbId", show.Ids.Tmdb);
            SetProperty("#Trakt.Show.TvRageId", show.Ids.TvRage);
            SetProperty("#Trakt.Show.Title", show.Title.RemapHighOrderChars());
            SetProperty("#Trakt.Show.Language", Translation.GetLanguageFromISOCode(show.Language));
            SetProperty("#Trakt.Show.Url", string.Format("http://trakt.tv/shows/{0}", show.Ids.Slug));
            if (show.Airs != null)
            {
                SetProperty("#Trakt.Show.AirDay", show.FirstAired.FromISO8601().ToLocalisedDayOfWeek());
                SetProperty("#Trakt.Show.AirDayLocalized", show.FirstAired.FromISO8601().ToLocalTime().ToLocalisedDayOfWeek());
                SetProperty("#Trakt.Show.AirTime", show.FirstAired.FromISO8601().ToShortTimeString());
                SetProperty("#Trakt.Show.AirTimeLocalized", show.FirstAired.FromISO8601().ToLocalTime().ToShortTimeString());
                SetProperty("#Trakt.Show.AirTimezone", show.Airs.Timezone);
                SetProperty("#Trakt.Show.AirTimezoneWindows", show.Airs.Timezone.OlsenToWindowsTimezone());
            }
            SetProperty("#Trakt.Show.Certification", show.Certification);
            SetProperty("#Trakt.Show.Country", show.Country.ToCountryName());
            SetProperty("#Trakt.Show.FirstAired", show.FirstAired.FromISO8601().ToShortDateString());
            SetProperty("#Trakt.Show.FirstAiredLocalized", show.FirstAired.FromISO8601().ToLocalTime().ToShortDateString());
            SetProperty("#Trakt.Show.Network", show.Network);
            SetProperty("#Trakt.Show.Overview", show.Overview.ToNullIfEmpty() == null ? Translation.NoShowSummary : show.Overview.RemapHighOrderChars());
            SetProperty("#Trakt.Show.Runtime", show.Runtime);
            SetProperty("#Trakt.Show.Year", show.Year);
            SetProperty("#Trakt.Show.Status", show.Status);
            SetProperty("#Trakt.Show.TranslatedStatus", (show.Status ?? "").Replace(" " ,"").Translate());
            SetProperty("#Trakt.Show.Genres", TraktGenres.Translate(show.Genres));
            SetProperty("#Trakt.Show.InWatchList", show.IsWatchlisted());
            SetProperty("#Trakt.Show.InCollection", show.IsCollected());
            SetProperty("#Trakt.Show.Collected", show.Collected());
            SetProperty("#Trakt.Show.Watched", show.IsWatched());
            SetProperty("#Trakt.Show.AiredEpisodes", show.AiredEpisodes);
            SetProperty("#Trakt.Show.Plays", show.Plays());
            SetProperty("#Trakt.Show.Rating", show.UserRating());
            SetProperty("#Trakt.Show.Ratings.Percentage", show.Rating.ToPercentage());
            SetProperty("#Trakt.Show.Ratings.Votes", show.Votes);
            SetProperty("#Trakt.Show.Ratings.Icon", (show.Rating > 6) ? "love" : "hate");
            //if (show.Images != null)
            //{
            //    SetProperty("#Trakt.Show.FanartImageFilename", show.Images.Fanart.LocalImageFilename(ArtworkType.ShowFanart));
            //    SetProperty("#Trakt.Show.PosterImageFilename", show.Images.Poster.LocalImageFilename(ArtworkType.ShowPoster));
            //    SetProperty("#Trakt.Show.BannerImageFilename", show.Images.Banner.LocalImageFilename(ArtworkType.ShowBanner));
            //}
        }
Esempio n. 2
0
 public static void ShowTVShowShouts(TraktShowSummary show)
 {
     var images = TmdbCache.GetShowImages(show.Ids.Tmdb, true);
     ShowTVShowShouts(show.Title, show.Year, show.Ids.Tvdb, show.Ids.Trakt, show.Ids.Imdb, show.IsWatched(), TmdbCache.GetShowBackdropFilename(images), TmdbCache.GetShowBackdropUrl(images));
 }