private void PublishMovieSkinProperties(TraktMovieTrending trendingItem) { GUICommon.SetProperty("#Trakt.Movie.Watchers", trendingItem.Watchers.ToString()); GUICommon.SetProperty("#Trakt.Movie.Watchers.Extra", trendingItem.Watchers > 1 ? string.Format(Translation.PeopleWatching, trendingItem.Watchers) : Translation.PersonWatching); GUICommon.SetMovieProperties(trendingItem.Movie); }
private void PublishMovieSkinProperties(TraktMovieAnticipated anticipatedItem) { GUICommon.SetProperty("#Trakt.Movie.ListCount", anticipatedItem.ListCount.ToString()); GUICommon.SetProperty("#Trakt.Movie.ListCount.Extra", string.Format(Translation.AppearsInList, anticipatedItem.ListCount)); GUICommon.SetMovieProperties(anticipatedItem.Movie); }
private void InitProperties() { // only set property if file exists // if we set now and download later, image will not set to skin if (File.Exists(Fanart)) { GUIUtils.SetProperty("#Trakt.Movie.FanartImageFilename", Fanart); } else { DownloadFanart(); } // set credit type property GUIUtils.SetProperty("#Trakt.Credit.Type", Type == CreditType.Cast ? Translation.Cast : Translation.Crew); // Set current Movie properties if (Movie != null) { GUICommon.SetMovieProperties(Movie); } // load last layout CurrentLayout = (GUIFacadeControl.Layout)TraktSettings.CreditsMovieDefaultLayout; // update button label if (layoutButton != null) { GUIControl.SetControlLabel(GetID, layoutButton.GetID, GUICommon.GetLayoutTranslation(CurrentLayout)); } }
private void PublishCastSkinProperties(TraktPersonMovieCast creditItem) { GUICommon.SetProperty("#Trakt.Person.Movie.CreditValue", creditItem.Character); GUICommon.SetProperty("#Trakt.Person.Movie.CreditType", Translation.Character); GUICommon.SetMovieProperties(creditItem.Movie); }
private void PublishCrewSkinProperties(TraktPersonMovieJob creditItem) { GUICommon.SetProperty("#Trakt.Person.Movie.CreditValue", GUICommon.GetTranslatedCreditJob(creditItem.Job)); GUICommon.SetProperty("#Trakt.Person.Movie.CreditType", Translation.Job); GUICommon.SetMovieProperties(creditItem.Movie); }
private void PublishMovieSkinProperties(TraktUserListItem item) { if (item == null || item.Movie == null) { return; } GUICommon.SetMovieProperties(item.Movie); }
private TraktMovieSummary GetMovieSummary(string id) { var movieSummary = TraktAPI.TraktAPI.GetMovieSummary(id); if (movieSummary != null) { // Publish Movie Properties GUICommon.SetMovieProperties(movieSummary); } return(movieSummary); }
private void OnMovieSelected(GUIListItem item, GUIControl parent) { var selectedMovie = item.TVTag as TraktMovie; if (selectedMovie == null) { return; } PreviousSelectedIndex = Facade.SelectedListItemIndex; GUICommon.SetProperty("#Trakt.Movie.WatchedDate", (item as GUIMovieListItem).Date); GUICommon.SetMovieProperties(selectedMovie); GUIImageHandler.LoadFanart(backdrop, selectedMovie.Images.Fanart.LocalImageFilename(ArtworkType.MovieFanart)); }
private void OnMovieSelected(GUIListItem item, GUIControl parent) { var selectedMovie = item.TVTag as TraktMovieSummary; if (selectedMovie == null) { return; } PreviousSelectedIndex = Facade.SelectedListItemIndex; GUICommon.SetProperty("#Trakt.Movie.AddedDate", (item as GUIMovieListItem).Date); GUICommon.SetMovieProperties(selectedMovie); GUIImageHandler.LoadFanart(backdrop, TmdbCache.GetMovieBackdropFilename((item as GUIMovieListItem).Images.MovieImages)); }
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 PublishMovieSkinProperties(TraktWatchListMovie movie) { GUICommon.SetProperty("#Trakt.Movie.WatchList.Inserted", movie.Inserted.FromEpoch().ToShortDateString()); GUICommon.SetMovieProperties(movie); }
private void PublishCalendarSkinProperties(TraktMovieCalendar calendarItem) { GUICommon.SetMovieProperties(calendarItem.Movie); }
private void PublishMovieSkinProperties(TraktMovieSummary PopularItem) { GUICommon.SetMovieProperties(PopularItem); }
private void PublishMovieSkinProperties(TraktMovieBoxOffice boxOfficeMovie) { GUIUtils.SetProperty("#Trakt.Movie.Revenue", string.Format("{0:C0}", boxOfficeMovie.Revenue)); GUIUtils.SetProperty("#Trakt.Movie.Revenue.Raw", boxOfficeMovie.Revenue.ToString()); GUICommon.SetMovieProperties(boxOfficeMovie.Movie); }
private void PublishWatchlistSkinProperties(TraktMovieWatchList item) { GUICommon.SetProperty("#Trakt.Movie.WatchList.Inserted", item.ListedAt.FromISO8601().ToShortDateString()); GUICommon.SetMovieProperties(item.Movie); }
private void PublishMovieSkinProperties(TraktMovieSummary movie) { GUICommon.SetMovieProperties(movie); }