コード例 #1
0
ファイル: TheTVDB.cs プロジェクト: GaanDjin/BlueVideoRenamer
        /// <summary>
        /// Gets a summary about the seasons and total episodes in the requested series.
        /// </summary>
        /// <param name="seriesID">The series to lookup</param>
        /// <returns>An object containing the series episodes summary.</returns>
        public async Task <SeriesEpisodesSummary> QueryEpisodesSummary(SeriesSearchResult series)
        {
            if (series == null)
            {
                LastError = "null SeriesSearchResult passed to v!";
                return(null);
            }

            if (series.Id <= 0)
            {
                LastError = "Invalid SeriesSearchResult passed to QueryEpisodesSummary!";
                return(null);
            }

            return(await QueryEpisodesSummary(series.Id.Value));
        }
コード例 #2
0
ファイル: TheTVDB.cs プロジェクト: GaanDjin/BlueVideoRenamer
        /// <summary>
        /// Gets all episodes for a given series that match the given search parameters
        /// </summary>
        /// <param name="series">The series to look up</param>
        /// <param name="searchparams">The search parameters organized by search key and value</param>
        /// <returns>A list of all episodes for the given series.</returns>
        public async Task <Episode[]> QueryEpisodes(SeriesSearchResult series, Dictionary <string, string> searchparams = null)
        {
            if (series == null)
            {
                LastError = "null SeriesSearchResult passed to QueryEpisodes!";
                return(null);
            }

            if (series.Id <= 0)
            {
                LastError = "Invalid SeriesSearchResult passed to QueryEpisodes!";
                return(null);
            }

            return(await QueryEpisodes(series.Id.Value, searchparams));
        }
コード例 #3
0
ファイル: TheTVDB.cs プロジェクト: GaanDjin/BlueVideoRenamer
        /// <summary>
        /// Gets all episodes for a given series.
        /// Handles the paged calls and returns all of them.
        /// </summary>
        /// <param name="series">The series to look up</param>
        /// <returns>A list of all episodes for the given series.</returns>
        public async Task <Episode[]> GetAllEpisodes(SeriesSearchResult series)
        {
            if (series == null)
            {
                LastError = "null SeriesSearchResult passed to GetAllEpisodes!";
                return(null);
            }

            if (series.Id <= 0)
            {
                LastError = "Invalid SeriesSearchResult passed to GetAllEpisodes!";
                return(null);
            }

            return(await GetAllEpisodes(series.Id.Value));
        }
コード例 #4
0
ファイル: TheTVDB.cs プロジェクト: GaanDjin/BlueVideoRenamer
        /// <summary>
        /// Gets the episodes for a series. This is paged by 100 results a page.
        /// </summary>
        /// <param name="series">The series to look up</param>
        /// <param name="page">The paged results for the episodes</param>
        /// <returns>The list of episodes and page data.</returns>
        public async Task <EpisodesResponse> GetEpisodes(SeriesSearchResult series, int page = 1)
        {
            if (series == null)
            {
                LastError = "null SeriesSearchResult passed to GetEpisodes!";
                return(null);
            }

            if (series.Id <= 0)
            {
                LastError = "Invalid SeriesSearchResult passed to GetEpisodes!";
                return(null);
            }

            return(await GetEpisodes(series.Id.Value, page));
        }
コード例 #5
0
ファイル: TheTVDB.cs プロジェクト: GaanDjin/BlueVideoRenamer
        /// <summary>
        /// Gets an array of value keys that can be used in <see cref="QueryImages(Series, Dictionary{string, string})"/>.
        /// </summary>
        /// <param name="series">The series to lookup</param>
        /// <returns>An array of keys to use for searching images in a series</returns>
        public async Task <SeriesImagesQueryParam[]> QueryImageParams(SeriesSearchResult series)
        {
            if (series == null)
            {
                LastError = "null SeriesSearchResult passed to QueryImageParams!";
                return(null);
            }

            if (series.Id <= 0)
            {
                LastError = "Invalid SeriesSearchResult passed to QueryImageParams!";
                return(null);
            }

            return(await QueryImageParams(series.Id.Value));
        }
コード例 #6
0
ファイル: TheTVDB.cs プロジェクト: GaanDjin/BlueVideoRenamer
        /// <summary>
        /// Returns a summary of the images for a particular series
        /// </summary>
        /// <param name="series">The series to lookup</param>
        /// <returns>The summary information of the images the server has on this series.</returns>
        public async Task <SeriesImagesCount> ImageSummary(SeriesSearchResult series)
        {
            if (series == null)
            {
                LastError = "null SeriesSearchResult passed to ImageSummary!";
                return(null);
            }

            if (series.Id <= 0)
            {
                LastError = "Invalid SeriesSearchResult passed to ImageSummary!";
                return(null);
            }

            return(await ImageSummary(series.Id.Value));
        }