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 PublishShowSkinProperties(TraktShowAnticipated anticipatedItem) { GUICommon.SetProperty("#Trakt.Show.ListCount", anticipatedItem.ListCount.ToString()); GUICommon.SetProperty("#Trakt.Show.ListCount.Extra", string.Format(Translation.AppearsInList, anticipatedItem.ListCount)); GUICommon.SetShowProperties(anticipatedItem.Show); }
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 SetCurrentView() { // Set current view in button label if (viewButton != null) { viewButton.Label = Translation.View + ": " + GetCalendarTypeName(CurrentCalendar); } GUICommon.SetProperty("#Trakt.Calendar.Type", CurrentCalendar.ToString()); switch (CurrentCalendar) { case CalendarType.UserMovies: GUICommon.SetProperty("#Trakt.CurrentView", Translation.CalendarMyMovies); break; case CalendarType.UserDVDs: GUICommon.SetProperty("#Trakt.CurrentView", Translation.CalendarMyDVDs); break; case CalendarType.AllMovies: GUICommon.SetProperty("#Trakt.CurrentView", Translation.CalendarAllMovies); break; case CalendarType.AllDVDs: GUICommon.SetProperty("#Trakt.CurrentView", Translation.CalendarAllDVDs); break; } }
private void PublishCastSkinProperties(TraktPersonShowCast creditItem) { GUICommon.SetProperty("#Trakt.Person.Show.CreditValue", creditItem.Character); GUICommon.SetProperty("#Trakt.Person.Show.CreditType", Translation.Character); GUICommon.SetShowProperties(creditItem.Show); }
private void PublishShowSkinProperties(TraktShowTrending trendingItem) { GUICommon.SetProperty("#Trakt.Show.Watchers", trendingItem.Watchers.ToString()); GUICommon.SetProperty("#Trakt.Show.Watchers.Extra", trendingItem.Watchers > 1 ? string.Format(Translation.PeopleWatching, trendingItem.Watchers) : Translation.PersonWatching); GUICommon.SetShowProperties(trendingItem.Show); }
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() { // Fanart backdrop.GUIImageOne = FanartBackground; backdrop.GUIImageTwo = FanartBackground2; backdrop.LoadingImage = loadingImage; // load Watch list for user if (string.IsNullOrEmpty(CurrentUser)) { CurrentUser = TraktSettings.Username; } GUICommon.SetProperty("#Trakt.WatchList.CurrentUser", CurrentUser); // load last layout CurrentLayout = (Layout)TraktSettings.WatchListMoviesDefaultLayout; // Update Button States UpdateButtonState(); if (sortButton != null) { sortButton.SortChanged += (o, e) => { TraktSettings.SortByWatchListMovies.Direction = (SortingDirections)(e.Order - 1); PreviousSelectedIndex = 0; UpdateButtonState(); LoadWatchListMovies(); }; } }
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 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 InitProperties() { // Fanart backdrop.GUIImageOne = FanartBackground; backdrop.GUIImageTwo = FanartBackground2; backdrop.LoadingImage = loadingImage; // load watched history for user if (string.IsNullOrEmpty(CurrentUser)) { CurrentUser = TraktSettings.Username; } GUICommon.SetProperty("#Trakt.RecentWatched.CurrentUser", CurrentUser); // load last layout CurrentLayout = (Layout)TraktSettings.RecentWatchedMoviesDefaultLayout; // Update Button States UpdateButtonState(); // don't remember previous selected if a different user if (PreviousUser != CurrentUser) { PreviousSelectedIndex = 0; } }
private void ClearProperties() { GUICommon.SetProperty("#Trakt.Episode.WatchList.Inserted", string.Empty); GUICommon.ClearShowProperties(); GUICommon.ClearEpisodeProperties(); }
private void OnUserSelected(GUIListItem item, GUIControl parent) { if (CurrentView == View.Friends) { var friend = item.TVTag as TraktNetworkFriend; GUICommon.SetProperty("#Trakt.Network.FriendsAt", friend.FriendsAt.FromISO8601().ToLongDateString()); CurrentSelectedUser = friend.User; } else if (CurrentView == View.Requests) { var request = item.TVTag as TraktFollowerRequest; GUICommon.SetProperty("#Trakt.Network.RequestAt", request.RequestedAt.FromISO8601().ToLongDateString()); CurrentSelectedUser = request.User; } else { var follower = item.TVTag as TraktNetworkUser; GUICommon.SetProperty("#Trakt.Network.RequestAt", follower.FollowedAt.FromISO8601().ToLongDateString()); CurrentSelectedUser = follower.User; } PublishUserSkinProperties(CurrentSelectedUser); // reset selected indicies PreviousUserSelectedIndex = Facade.SelectedListItemIndex; PreviousActivityTypeSelectedIndex = 0; }
private void SetCurrentView() { GUIUtils.SetProperty("#Trakt.View.Level", CurrentViewLevel.ToString()); if (CurrentView == View.Friends) { GUICommon.SetProperty("#Trakt.CurrentView", Translation.Friends); } else if (CurrentView == View.Followers) { GUICommon.SetProperty("#Trakt.CurrentView", Translation.Followers); } else if (CurrentView == View.Following) { GUICommon.SetProperty("#Trakt.CurrentView", Translation.Following); } else if (CurrentView == View.Requests) { GUICommon.SetProperty("#Trakt.CurrentView", Translation.FollowerRequests); } if (viewButton != null) { viewButton.Label = Translation.View + ": " + GetViewTypeName(CurrentView); } }
private void InitProperties() { // Fanart backdrop.GUIImageOne = FanartBackground; backdrop.GUIImageTwo = FanartBackground2; backdrop.LoadingImage = loadingImage; // load recently added for user if (string.IsNullOrEmpty(CurrentUser)) { CurrentUser = TraktSettings.Username; } GUICommon.SetProperty("#Trakt.RecentShouts.CurrentUser", CurrentUser); if (hideSpoilersButton != null) { hideSpoilersButton.Label = Translation.HideSpoilers; hideSpoilersButton.Selected = TraktSettings.HideSpoilersOnShouts; } // don't remember previous selected if a different user if (PreviousUser != CurrentUser) { PreviousSelectedIndex = 0; } }
private void PublishCrewSkinProperties(TraktPersonShowJob creditItem) { GUICommon.SetProperty("#Trakt.Person.Show.CreditValue", GUICommon.GetTranslatedCreditJob(creditItem.Job)); GUICommon.SetProperty("#Trakt.Person.Show.CreditType", Translation.Job); GUICommon.SetShowProperties(creditItem.Show); }
private void InitProperties() { // Fanart backdrop.GUIImageOne = FanartBackground; backdrop.GUIImageTwo = FanartBackground2; backdrop.LoadingImage = loadingImage; // publish person properties GUICommon.SetPersonProperties(CurrentPerson); // publish credit type GUICommon.SetProperty("#Trakt.Person.CreditTypeRaw", CurrentCreditType.ToString()); GUICommon.SetProperty("#Trakt.Person.CreditType", GUICommon.GetTranslatedCreditType(CurrentCreditType)); // load last layout CurrentLayout = (GUIFacadeControl.Layout)TraktSettings.PersonShowCreditsDefaultLayout; // Update Button States UpdateButtonState(); if (sortButton != null) { UpdateButtonState(); sortButton.SortChanged += (o, e) => { TraktSettings.SortByCreditShows.Direction = (SortingDirections)(e.Order - 1); PreviousSelectedIndex = 0; UpdateButtonState(); LoadCredits(); }; } return; }
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 PublishSeasonSkinProperties(TraktUserListItem item) { if (item == null) { return; } GUICommon.SetProperty("#Trakt.Season.Number", item.SeasonNumber); PublishShowSkinProperties(item); }
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 InitProperties() { // set current user to logged in user if not set if (string.IsNullOrEmpty(CurrentUser)) { CurrentUser = TraktSettings.Username; } GUICommon.SetProperty("#Trakt.Lists.CurrentUser", CurrentUser); }
private void InitProperties() { // load profile for user if (string.IsNullOrEmpty(CurrentUser)) { CurrentUser = TraktSettings.Username; } // this property will be the same as the standard username property // with one exception, it will get set immediately upon page load GUICommon.SetProperty("#Trakt.UserProfile.CurrentUser", CurrentUser); }
private void OnEpisodeSelected(GUIListItem item, GUIControl parent) { // publish extended properties, selected index excludes date headers. GUICommon.SetProperty("#Trakt.Calendar.Selected.Date", (item as GUIEpisodeListItem).Date); GUICommon.SetProperty("#selectedindex", (item as GUIEpisodeListItem).SelectedIndex); var episode = item.TVTag as TraktEpisodeSummary; PublishEpisodeSkinProperties(episode); GUIImageHandler.LoadFanart(backdrop, episode.Show.Images.Fanart.LocalImageFilename(ArtworkType.ShowFanart)); }
private void OnMovieSelected(GUIListItem item, GUIControl parent) { // publish extended properties, selected index excludes date headers. GUICommon.SetProperty("#Trakt.Calendar.Selected.Date", (item as GUIMovieListItem).Date); GUICommon.SetProperty("#selectedindex", (item as GUIMovieListItem).SelectedIndex); var calendarItem = item.TVTag as TraktMovieCalendar; PublishCalendarSkinProperties(calendarItem); GUIImageHandler.LoadFanart(backdrop, TmdbCache.GetMovieBackdropFilename((item as GUIMovieListItem).Images.MovieImages)); }
private void OnEpisodeSelected(GUIListItem item, GUIControl parent) { PreviousSelectedIndex = Facade.SelectedListItemIndex; // publish watchlist properties GUICommon.SetProperty("#Trakt.Episode.WatchList.Inserted", (item as GUIEpisodeListItem).Date); var episodeSummary = item.TVTag as TraktEpisodeSummary; PublishEpisodeSkinProperties(episodeSummary); GUIImageHandler.LoadFanart(backdrop, episodeSummary.Show.Images.Fanart.LocalImageFilename(ArtworkType.ShowFanart)); }
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 InitProperties() { // restore list type if returning to window // loading parameter will be lost if loaded list items // or comments for a selected list TraktListType LastListType = ListType; // check if skin is using hyperlinkParameter if (!string.IsNullOrEmpty(_loadParameter)) { if (_loadParameter.ToLowerInvariant() == "trending") { ListType = TraktListType.Trending; } if (_loadParameter.ToLowerInvariant() == "popular") { ListType = TraktListType.Popular; } if (_loadParameter.ToLowerInvariant() == "liked") { ListType = TraktListType.Liked; } } else if (!ReturningFromListItemsOrComments) { // default to user lists ListType = TraktListType.User; } // if we're in a different list view since last time // then reset last selected index if (LastListType != ListType) { PreviousSelectedIndex = 0; } // set current user to logged in user if not set if (string.IsNullOrEmpty(CurrentUser)) { CurrentUser = TraktSettings.Username; } if (ListType == TraktListType.Trending) { GUIUtils.SetProperty("#Trakt.List.LikesThisWeek", string.Empty); GUIUtils.SetProperty("#Trakt.List.CommentsThisWeek", string.Empty); } GUICommon.SetProperty("#Trakt.Lists.ListType", ListType.ToString()); GUICommon.SetProperty("#Trakt.Lists.CurrentUser", CurrentUser); }
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 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)); }