private void OnItemSelected(GUIListItem item, GUIControl parent) { TraktListDetail list = null; if (item.TVTag is TraktListDetail) { list = item.TVTag as TraktListDetail; } else if (item.TVTag is TraktListTrending) { var trending = item.TVTag as TraktListTrending; list = trending.List; GUICommon.SetProperty("#Trakt.List.LikesThisWeek", trending.LikesThisWeek); GUICommon.SetProperty("#Trakt.List.CommentsThisWeek", trending.CommentsThisWeek); } else if (item.TVTag is TraktListPopular) { var popular = item.TVTag as TraktListPopular; list = popular.List; } else if (item.TVTag is TraktLike) { var likedItem = item.TVTag as TraktLike; list = likedItem.List; } GUICommon.SetListProperties(list); }
private void PublishListProperties(TraktListDetail list) { if (list == null) { return; } GUICommon.SetListProperties(list); }
private void InitProperties() { GUICommon.SetProperty("#Trakt.List.Username", CurrentUser); GUICommon.SetListProperties(CurrentList); if (PreviousSlug != CurrentList.Ids.Trakt) { PreviousSelectedIndex = 0; } PreviousSlug = (int)CurrentList.Ids.Trakt; // Fanart backdrop.GUIImageOne = FanartBackground; backdrop.GUIImageTwo = FanartBackground2; backdrop.LoadingImage = loadingImage; // load last layout CurrentLayout = (GUIFacadeControl.Layout)TraktSettings.ListItemsDefaultLayout; // update button label GUIControl.SetControlLabel(GetID, layoutButton.GetID, GUICommon.GetLayoutTranslation(CurrentLayout)); }
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); } }