示例#1
0
        public static async Task GetEpisodeMetadata(TvDbWrapper api, string seasonPath)
        {
            var parent   = new DirectoryInfo(seasonPath).Parent;
            var seriesId = SeriesIOHelper.GetSeriesIdFromFile(parent.FullName);

            await GetEpisodeMetadata(api, seriesId, seasonPath).ConfigureAwait(false);
        }
示例#2
0
        public static async Task GetSeriesInfo(TvDbWrapper api, string seriesPath, bool includeSeasons = false)
        {
            //first get series data
            var seriesId = SeriesIOHelper.GetSeriesIdFromFile(seriesPath);

            await GetSeriesInfo(api, seriesPath, seriesId, includeSeasons).ConfigureAwait(false);
        }
示例#3
0
        public static async Task <IEnumerable <Episode> > GetEpisodes(TvDbWrapper api, string seasonPath)
        {
            var parent   = new DirectoryInfo(seasonPath).Parent;
            var seriesId = SeriesIOHelper.GetSeriesIdFromFile(parent.FullName);
            var fullRec  = await api.GetSeriesFullRecord(seriesId).ConfigureAwait(false);

            var seasonName = new DirectoryInfo(seasonPath).Name;
            var seasonNo   = seasonName.Split(" ".ToCharArray())[1];

            var seasonEpisodes = fullRec.Episodes.Where(ep => ep.CombinedSeason == seasonNo);

            return(seasonEpisodes);
        }