コード例 #1
0
        private void LoadShows()
        {
            try
            {
                shows.Clear();

                var userSettings = pm.Retrieve <UserSettings>("index");

                if (userSettings == null)
                {
                    return;
                }

                foreach (var show in userSettings.Shows)
                {
                    if (show.Seasons.Count > 0)
                    {
                        show.SelectedSeason = show.Seasons[show.Seasons.Count - 1];
                    }

                    shows.Add(show);

                    ImageHelper.LoadDefaultImages(show);
                    ImageHelper.GetShowImageUrl(show);
                }

                UpdateTimeline();
                UpdateBacklog();
            }
            catch (Exception ex)
            {
                ErrorManager.Log(ex);
            }
        }
コード例 #2
0
        private void LoadShows()
        {
            shows.Clear();

            var userSettings = pm.Retrieve <UserSettings>("index");

            if (userSettings == null)
            {
                return;
            }
            if (userSettings.Shows == null)
            {
                return;
            }

            ImageHelper.DeleteUnusedImages(userSettings.Shows);

            foreach (var show in userSettings.Shows)
            {
                if (show.Seasons.Count > 0)
                {
                    show.SelectedSeason = show.Seasons[show.Seasons.Count - 1];
                }

                shows.Add(show);

                ImageHelper.LoadDefaultImages(show);
                ImageHelper.GetShowImage(show);
                ImageHelper.GetEpisodeImages(show);
            }

            UpdateTimeline();
            UpdateBacklog();
        }