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.Show.FanartImageFilename", Fanart); } else { DownloadFanart(); } // set credit type property GUIUtils.SetProperty("#Trakt.Credit.Type", Type == CreditType.Cast ? Translation.Cast : Translation.Crew); // Set current Show properties if (Show != null) { GUICommon.SetShowProperties(Show); } // load last layout CurrentLayout = (Layout)TraktSettings.CreditsShowDefaultLayout; // update button label if (layoutButton != null) { GUIControl.SetControlLabel(GetID, layoutButton.GetID, GUICommon.GetLayoutTranslation(CurrentLayout)); } }
private void InitProperties() { // Fanart backdrop.GUIImageOne = FanartBackground; backdrop.GUIImageTwo = FanartBackground2; backdrop.LoadingImage = loadingImage; // set context property string title = string.IsNullOrEmpty(relatedShow.Title) ? relatedShow.TVDbId : relatedShow.Title; GUIUtils.SetProperty("#Trakt.Related.Show", title); // hide watched HideWatched = TraktSettings.HideWatchedRelatedShows; // hide watched if (hideWatchedButton != null) { GUIControl.SetControlLabel((int)TraktGUIWindows.RelatedShows, hideWatchedButton.GetID, Translation.HideWatched); hideWatchedButton.Selected = HideWatched; } // no changes yet RelationChanged = false; // load last layout CurrentLayout = (Layout)TraktSettings.RelatedShowsDefaultLayout; // update button label GUIControl.SetControlLabel(GetID, layoutButton.GetID, GUICommon.GetLayoutTranslation(CurrentLayout)); }
private void InitProperties() { // set search term from loading parameter if (!string.IsNullOrEmpty(_loadParameter)) { TraktLogger.Debug("User Search Loading Parameter: {0}", _loadParameter); SearchTerm = _loadParameter; } // remember previous search term SearchTermChanged = false; if (PreviousSearchTerm != SearchTerm) { SearchTermChanged = true; } PreviousSearchTerm = SearchTerm; // set context property GUIUtils.SetProperty("#Trakt.Search.SearchTerm", SearchTerm); // load last layout CurrentLayout = (GUIFacadeControl.Layout)TraktSettings.SearchUsersDefaultLayout; // update button label if (layoutButton != null) { GUIControl.SetControlLabel(GetID, layoutButton.GetID, GUICommon.GetLayoutTranslation(CurrentLayout)); } }
private void InitProperties() { // Fanart backdrop.GUIImageOne = FanartBackground; backdrop.GUIImageTwo = FanartBackground2; backdrop.LoadingImage = loadingImage; // set search term from loading parameter if (!string.IsNullOrEmpty(_loadParameter)) { TraktLogger.Debug("Episode Search Loading Parameter: {0}", _loadParameter); SearchTerm = _loadParameter; } // remember previous search term SearchTermChanged = false; if (PreviousSearchTerm != SearchTerm) { SearchTermChanged = true; } PreviousSearchTerm = SearchTerm; // set context property GUIUtils.SetProperty("#Trakt.Search.SearchTerm", SearchTerm); // load last layout CurrentLayout = (Layout)TraktSettings.SearchShowsDefaultLayout; // update button label GUIControl.SetControlLabel(GetID, layoutButton.GetID, GUICommon.GetLayoutTranslation(CurrentLayout)); }
private void UpdateButtonState() { // update layout button label GUIControl.SetControlLabel(GetID, layoutButton.GetID, GUICommon.GetLayoutTranslation(CurrentLayout)); // update sortby button label if (sortButton != null) { sortButton.Label = GUICommon.GetSortByString(TraktSettings.SortByPopularMovies); sortButton.IsAscending = (TraktSettings.SortByPopularMovies.Direction == SortingDirections.Ascending); } GUIUtils.SetProperty("#Trakt.SortBy", GUICommon.GetSortByString(TraktSettings.SortByPopularMovies)); // update filter buttons if (filterWatchedButton != null) { filterWatchedButton.Selected = TraktSettings.PopularMoviesHideWatched; } if (filterWatchListedButton != null) { filterWatchListedButton.Selected = TraktSettings.PopularMoviesHideWatchlisted; } if (filterCollectedButton != null) { filterCollectedButton.Selected = TraktSettings.PopularMoviesHideCollected; } if (filterRatedButton != null) { filterRatedButton.Selected = TraktSettings.PopularMoviesHideRated; } }
private void InitProperties() { GUIUtils.SetProperty("#Trakt.List.Username", CurrentUser); GUIUtils.SetProperty("#Trakt.List.Slug", CurrentList.Slug); GUIUtils.SetProperty("#Trakt.List.Name", CurrentList.Name); GUIUtils.SetProperty("#Trakt.List.Description", CurrentList.Description); GUIUtils.SetProperty("#Trakt.List.Privacy", CurrentList.Privacy); GUIUtils.SetProperty("#Trakt.List.Url", CurrentList.Url); if (PreviousSlug != CurrentList.Slug) { PreviousSelectedIndex = 0; } PreviousSlug = CurrentList.Slug; // Fanart backdrop.GUIImageOne = FanartBackground; backdrop.GUIImageTwo = FanartBackground2; backdrop.LoadingImage = loadingImage; // load last layout CurrentLayout = (Layout)TraktSettings.ListItemsDefaultLayout; // update button label GUIControl.SetControlLabel(GetID, layoutButton.GetID, GUICommon.GetLayoutTranslation(CurrentLayout)); }
private void InitProperties() { // only set property if file exists // if we set now and download later, image will not set to skin var showImages = TmdbCache.GetShowImages(Show.Ids.Tmdb, true); var backdropFilename = TmdbCache.GetShowBackdropFilename(showImages); if (backdropFilename != null) { if (File.Exists(backdropFilename)) { GUIUtils.SetProperty("#Trakt.Show.Fanart", backdropFilename); } } else if (Fanart != null) { if (File.Exists(Fanart)) { GUIUtils.SetProperty("#Trakt.Show.Fanart", Fanart); } } // Load Show Properties PublishShowSkinProperties(Show); // load last layout CurrentLayout = (GUIFacadeControl.Layout)TraktSettings.ShowSeasonsDefaultLayout; // update layout button label GUIControl.SetControlLabel(GetID, layoutButton.GetID, GUICommon.GetLayoutTranslation(CurrentLayout)); }
private void InitProperties() { // Fanart backdrop.GUIImageOne = FanartBackground; backdrop.GUIImageTwo = FanartBackground2; backdrop.LoadingImage = loadingImage; // load last layout CurrentLayout = (Layout)TraktSettings.RecommendedShowsDefaultLayout; // update button label GUIControl.SetControlLabel(GetID, layoutButton.GetID, GUICommon.GetLayoutTranslation(CurrentLayout)); // genres CurrentGenre = TraktSettings.ShowRecommendationGenre; if (genreButton != null) { GUIControl.SetControlLabel(GetID, genreButton.GetID, TraktGenres.ItemName(CurrentGenre)); } // toggles for hide collected/watchlisted HideCollected = TraktSettings.ShowRecommendationHideCollected; HideWatchlisted = TraktSettings.ShowRecommendationHideWatchlisted; if (hideCollectedButton != null) { hideCollectedButton.Selected = HideCollected; GUIControl.SetControlLabel(GetID, hideCollectedButton.GetID, Translation.HideCollected); } if (hideWatchlistedButton != null) { hideWatchlistedButton.Selected = HideWatchlisted; GUIControl.SetControlLabel(GetID, hideWatchlistedButton.GetID, Translation.HideWatchlisted); } // start/end year StartYear = TraktSettings.ShowRecommendationStartYear; EndYear = TraktSettings.ShowRecommendationEndYear; if (startYearButton != null) { GUIControl.SetControlLabel(GetID, startYearButton.GetID, GetStartYearTitle(StartYear)); } if (endYearButton != null) { GUIControl.SetControlLabel(GetID, endYearButton.GetID, GetEndYearTitle(EndYear)); } SetRecommendationProperties(); if (sortButton != null) { UpdateButtonState(); sortButton.SortChanged += (o, e) => { TraktSettings.SortByRecommendedShows.Direction = (SortingDirections)(e.Order - 1); PreviousSelectedIndex = 0; UpdateButtonState(); LoadRecommendedShows(); }; } }
private void InitProperties() { // Fanart backdrop.GUIImageOne = FanartBackground; backdrop.GUIImageTwo = FanartBackground2; backdrop.LoadingImage = loadingImage; // load last layout CurrentLayout = (GUIFacadeControl.Layout)TraktSettings.BoxOfficeDefaultLayout; // update button label GUIControl.SetControlLabel(GetID, layoutButton.GetID, GUICommon.GetLayoutTranslation(CurrentLayout)); }
private void UpdateButtonState() { // update layout button label GUIControl.SetControlLabel(GetID, layoutButton.GetID, GUICommon.GetLayoutTranslation(CurrentLayout)); // update sortby button label if (sortButton != null) { sortButton.Label = GUICommon.GetSortByString(TraktSettings.SortByWatchListMovies); sortButton.IsAscending = (TraktSettings.SortByWatchListMovies.Direction == SortingDirections.Ascending); } GUIUtils.SetProperty("#Trakt.SortBy", GUICommon.GetSortByString(TraktSettings.SortByWatchListMovies)); }
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(Show.Images.FanartImageFilename)) { GUIUtils.SetProperty("#Trakt.Show.Fanart", Show.Images.FanartImageFilename); } // load last layout CurrentLayout = (Layout)TraktSettings.SeasonEpisodesDefaultLayout; // update button label GUIControl.SetControlLabel(GetID, layoutButton.GetID, GUICommon.GetLayoutTranslation(CurrentLayout)); }
private void InitProperties() { // set search term from loading parameter if (!string.IsNullOrEmpty(_loadParameter)) { TraktLogger.Debug("Person Search Loading Parameter: {0}", _loadParameter); SearchTerm = _loadParameter; // check if the searchterm is a list of people if (SearchTerm.StartsWith("{") && SearchTerm.EndsWith("}")) { IsMultiPersonSearch = true; // multi-person search will most likely have fanart as its attached // to a movie, show or episode. string fanart = SearchTerm.FromJSON <PersonSearch>().Fanart; if (File.Exists(fanart)) { GUIUtils.SetProperty("#Trakt.People.Fanart", fanart); } } } // remember previous search term SearchTermChanged = false; if (PreviousSearchTerm != SearchTerm) { SearchTermChanged = true; } PreviousSearchTerm = SearchTerm; // set context property if (!IsMultiPersonSearch) { GUIUtils.SetProperty("#Trakt.Search.SearchTerm", SearchTerm); } else { GUIUtils.SetProperty("#Trakt.Search.SearchTerm", SearchTerm.FromJSON <PersonSearch>().Title); } // load last layout CurrentLayout = (Layout)TraktSettings.SearchPeopleDefaultLayout; // update button label if (layoutButton != null) { GUIControl.SetControlLabel(GetID, layoutButton.GetID, GUICommon.GetLayoutTranslation(CurrentLayout)); } }
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(Show.Images.Fanart.LocalImageFilename(ArtworkType.ShowFanart))) { GUIUtils.SetProperty("#Trakt.Show.Fanart", Show.Images.Fanart.LocalImageFilename(ArtworkType.ShowFanart)); } // Load Show Properties PublishShowSkinProperties(Show); // load last layout CurrentLayout = (Layout)TraktSettings.ShowSeasonsDefaultLayout; // update layout button label GUIControl.SetControlLabel(GetID, layoutButton.GetID, GUICommon.GetLayoutTranslation(CurrentLayout)); }
private void InitProperties() { // Fanart backdrop.GUIImageOne = FanartBackground; backdrop.GUIImageTwo = FanartBackground2; backdrop.LoadingImage = loadingImage; // load Watchlist for user if (string.IsNullOrEmpty(CurrentUser)) { CurrentUser = TraktSettings.Username; } GUICommon.SetProperty("#Trakt.WatchList.CurrentUser", CurrentUser); // load last layout CurrentLayout = (Layout)TraktSettings.WatchListEpisodesDefaultLayout; // update button label GUIControl.SetControlLabel(GetID, layoutButton.GetID, GUICommon.GetLayoutTranslation(CurrentLayout)); }
private void InitProperties() { // only set property if file exists // if we set now and download later, image will not set to skin var showImages = TmdbCache.GetShowImages(Show.Ids.Tmdb, true); var backdropFilename = TmdbCache.GetShowBackdropFilename(showImages); if (backdropFilename != null && File.Exists(backdropFilename)) { GUIUtils.SetProperty("#Trakt.Show.Fanart", backdropFilename); } // load last layout CurrentLayout = (Layout)TraktSettings.SeasonEpisodesDefaultLayout; // update button label if (layoutButton != null) { GUIControl.SetControlLabel(GetID, layoutButton.GetID, GUICommon.GetLayoutTranslation(CurrentLayout)); } }
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 UpdateButtonState() { // update layout button label GUIControl.SetControlLabel(GetID, layoutButton.GetID, GUICommon.GetLayoutTranslation(CurrentLayout)); }