private void PublishWatchlistSkinProperties(TraktEpisodeWatchList item) { // publish watchlist properties GUICommon.SetProperty("#Trakt.Episode.WatchList.Inserted", item.ListedAt.FromISO8601().ToShortDateString()); GUICommon.SetShowProperties(item.Show); GUICommon.SetEpisodeProperties(item.Show, item.Episode); }
private void PublishEpisodeSkinProperties(KeyValuePair <TraktShow, TraktWatchListEpisode.Episode> e) { var show = e.Key; var episode = e.Value; GUICommon.SetProperty("#Trakt.Episode.WatchList.Inserted", episode.Inserted.FromEpoch().ToShortDateString()); GUICommon.SetShowProperties(show); GUICommon.SetEpisodeProperties(episode); }
private void PublishEpisodeSkinProperties(TraktListItem item) { if (item == null || item.Episode == null) { return; } GUICommon.SetProperty("#Trakt.Season.Number", item.Episode.Season); GUICommon.SetEpisodeProperties(item.Show, item.Episode); PublishShowSkinProperties(item); }
private void OnEpisodeSelected(GUIListItem item, GUIControl parent) { PreviousSelectedIndex = Facade.SelectedListItemIndex; GUICommon.SetProperty("#Trakt.Episode.AddedDate", (item as GUIEpisodeListItem).Date); var episodeSummary = (TraktEpisodeSummary)item.TVTag; GUICommon.SetShowProperties(episodeSummary.Show); GUICommon.SetEpisodeProperties(episodeSummary.Episode); GUIImageHandler.LoadFanart(backdrop, episodeSummary.Show.Images.Fanart.LocalImageFilename(ArtworkType.ShowFanart)); }
private void PublishEpisodeSkinProperties(TraktUserListItem item) { if (item == null || item.Episode == null) { return; } GUICommon.SetEpisodeProperties(item.Episode); // workaround API not having episode number set // can be removed later when fixed GUICommon.SetProperty("#Trakt.Episode.Number", item.EpisodeNumber); PublishSeasonSkinProperties(item); }
private void OnEpisodeSelected(GUIListItem item, GUIControl parent) { var episode = item.TVTag as TraktEpisode; if (episode == null) { return; } GUICommon.SetEpisodeProperties(episode); // set season properties as well, we may show a flattened view // with all episodes in season GUICommon.SetSeasonProperties(Season); }
private void OnEpisodeSelected(GUIListItem item, GUIControl parent) { var episodeSummary = item.TVTag as TraktEpisodeSummary; if (episodeSummary == null) { return; } PreviousSelectedIndex = Facade.SelectedListItemIndex; GUICommon.SetEpisodeProperties(episodeSummary.Episode); // set season properties as well, we may show a flattened view // with all episodes in a show GUICommon.SetSeasonProperties(Season); GUICommon.SetShowProperties(Show); }
private void OnEpisodeSelected(GUIListItem item, GUIControl parent) { var recent = item.TVTag as TraktEpisodeHistory; if (recent == null) { return; } PreviousSelectedIndex = Facade.SelectedListItemIndex; GUICommon.SetProperty("#Trakt.Episode.WatchedDate", (item as GUIEpisodeListItem).Date); GUICommon.SetProperty("#Trakt.Episode.Action", recent.Action); GUICommon.SetShowProperties(recent.Show); GUICommon.SetEpisodeProperties(recent.Show, recent.Episode); GUIImageHandler.LoadFanart(backdrop, TmdbCache.GetShowBackdropFilename((item as GUIEpisodeListItem).Images.ShowImages)); }
private void OnEpisodeSelected(GUIListItem item, GUIControl parent) { PreviousSelectedIndex = Facade.SelectedListItemIndex; GUICommon.SetProperty("#Trakt.Episode.AddedDate", (item as GUIEpisodeListItem).Date); var episodeSummary = item.TVTag as TraktEpisodeSummaryEx; if (episodeSummary == null) { return; } GUICommon.SetShowProperties(episodeSummary.Show); GUICommon.SetEpisodeProperties(episodeSummary.Show, episodeSummary.Episode); GUIImageHandler.LoadFanart(backdrop, TmdbCache.GetShowBackdropFilename((item as GUIEpisodeListItem).Images.ShowImages)); }
private void PublishShoutSkinProperties(TraktActivity.Activity activity) { if (activity == null) { return; } if (activity.Shout == null && activity.Review == null) { return; } GUIUtils.SetProperty("#Trakt.Shout.Type", activity.Type); GUICommon.SetProperty("#Trakt.Shout.Date", activity.Timestamp.FromEpoch().ToShortDateString()); // set shout/review properties GUIUtils.SetProperty("#Trakt.Shout.Text", activity.Shout != null ? GetActivityShoutText(activity) : GetActivityReviewText(activity)); GUIUtils.SetProperty("#Trakt.Shout.Spoiler", activity.Shout != null ? activity.Shout.Spoiler.ToString() : activity.Review.Spoiler.ToString()); GUIUtils.SetProperty("#Trakt.Shout.Review", (activity.Review != null).ToString()); // set user properties GUICommon.SetUserProperties(activity.User); // set movie, show or episode properties // set show and episode properties for episode shouts if (activity.Movie != null) { GUICommon.SetMovieProperties(activity.Movie); } else { GUICommon.SetShowProperties(activity.Show); if (activity.Episode != null) { GUICommon.SetEpisodeProperties(activity.Episode); } } }
private void PublishCommentSkinProperties(TraktCommentItem item) { if (item == null || item.Comment == null) { return; } // set shout/review properties GUICommon.SetCommentProperties(item.Comment, item.IsWatched()); // set user properties GUICommon.SetUserProperties(item.Comment.User); // set movie, show, season, episode or list properties // set show and episode properties for episode comments // set show and season for season comments if (item.Movie != null) { GUICommon.SetMovieProperties(item.Movie); } else if (item.Show != null) { GUICommon.SetShowProperties(item.Show); if (item.Season != null) { GUICommon.SetSeasonProperties(item.Show, item.Season); } if (item.Episode != null) { GUICommon.SetEpisodeProperties(item.Show, item.Episode); } } else if (item.List != null) { GUICommon.SetListProperties(item.List, CurrentUser); } }
private void PublishSkinProperties(TraktEpisodeSummary episodeSummary) { GUICommon.SetShowProperties(episodeSummary.Show); GUICommon.SetEpisodeProperties(episodeSummary.Episode); }
private void PublishCalendarSkinProperties(TraktShowCalendar calendarItem) { GUICommon.SetShowProperties(calendarItem.Show); GUICommon.SetEpisodeProperties(calendarItem.Show, calendarItem.Episode); }