Beispiel #1
0
        public static void ExportMissingTvShowEpisodes()
        {
            var missingEpisodes = new List<EpisodeTreeList>();
            int i = 1;
            foreach (var series in TvDBFactory.TvDatabase)
            {
                if (series.Value.CountMissingEpisodes() > 0)
                {
                    var show = new EpisodeTreeList
                    {
                        id = i++,
                        seriesname = series.Value.SeriesName,
                        parent = 0
                    };
                    missingEpisodes.Add(show);
                    var episodes = series.Value.GetMissingEpisodes();
                    foreach (var episode in episodes)
                    {
                        var ep = new EpisodeTreeList
                        {
                            id = i++,
                            parent = show.id,
                            episodename = episode.EpisodeName,
                            seriesname = string.Format("{0}x{1:00}", episode.GetSeason().SeasonNumber, episode.EpisodeNumber)
                        };
                        missingEpisodes.Add(ep);

                        show.missingEpisodesCount++;
                    }
                }
            }

            if (missingEpisodes.Count == 0)
            {
                XtraMessageBox.Show("No missing episodes found", "No result");
            }
            else
            {
                ExportMissingEpisodes form = new ExportMissingEpisodes(missingEpisodes);
                form.Show();
            }
        }
Beispiel #2
0
        public static void ExportTvShowList()
        {
            var list = new List<EpisodeTreeList>();
            int i = 1;
            foreach (var series in TvDBFactory.TvDatabase)
            {
                    var show = new EpisodeTreeList
                    {
                        id = i++,
                        seriesname = series.Value.SeriesName,
                        parent = 0
                    };
                    list.Add(show);
                    var episodes = series.Value.GetMissingEpisodes();
                    foreach (var episode in episodes)
                    {
                        if (string.IsNullOrEmpty(episode.FilePath.PathAndFilename))
                        {
                            continue;
                        }

                        var ep = new EpisodeTreeList
                        {
                            id = i++,
                            parent = show.id,
                            episodename = episode.EpisodeName,
                            seriesname = string.Format("{0}x{1:00}", episode.GetSeason().SeasonNumber, episode.EpisodeNumber)
                        };
                        list.Add(ep);

                        show.missingEpisodesCount++;
                    }
            }

            if (list.Count == 0)
            {
                XtraMessageBox.Show("No movies found", "No result");
            }
            else
            {
                ExportMissingEpisodes form = new ExportMissingEpisodes(list, "Episode List ({0})");
                form.Show();
            }
        }