Example #1
0
        private static void FindSeries()
        {
            string seriesName = GetSeriesNameFromUser();
            TvShow series     = SeriesHandler.GetTvShowAsync(seriesName).Result;

            DisplaySeriesDetailsToConsole(series);
        }
Example #2
0
        public TvShow GetSeries(string seriesName)
        {
            TvShow tvShow = new TvShow();

            // <1> Check if series is already stored in memory. If yes then return it without downloading
            //if (_tvShowCache.IsSeriesAlreadyStored(seriesName, ref tvShow))
            //	return tvShow;
            // </1>

            // <2> Download series from web
            tvShow = _tvShowDownloader.GetTvShowAsync(seriesName).Result;
            // </2>

            // <3> Download nextEpisodeDate (could add: check if link is null)
            //tvShow.NextEpisodeDateDate = _tvShowDownloader.GetSeriesNextEpisodeDateAsync(tvShow.NextEpisodeLink).Result;
            // </3>

            // <4> Add new series to in-memory collection
            //_tvShowCache.AddSeriesToCollection(tvShow);
            // </4>

            return(tvShow);
        }