public virtual bool TryGetShowByTvDbId(int tvDbId, out TvShowBase show) { string responseString = bierdopjeService.GetShowByTvDbId(tvDbId.ToString(CultureInfo.InvariantCulture)); show = responseParser.GetTvShow(responseString); return(show.id != 0); }
public void ShouldParseCachedSingleTvShowCorrectly() { SubtitleServiceResponseDeserializer subtitlesServiceResponseParser = CreateSubtitlesServiceResponseParser(); TvShowBase tvShow = subtitlesServiceResponseParser.GetTvShow(TestResources.SingleShowCached); Assert.AreEqual(12934, tvShow.id); }
private static void WriteTvShowGenres(XmlWriter textWriter, TvShowBase show) { if (show.Genres != null) { foreach (string genre in show.Genres) { WriteTvElement(textWriter, "Genre", genre); } } }
public virtual bool TryGetShowByTvDbId(int tvDbId, out TvShowBase tvShow) { ITvSeries bierdopje = channelFactory.CreateChannel(); using (Stream responseStream = bierdopje.GetShowByTvDbId(tvDbId.ToString())) { string responseString = CreateStringFromStream(responseStream); CloseChannel(bierdopje); tvShow = responseParser.GetTvShow(responseString); return(tvShow.id != 0); } }
public void DownloadSubtitle(string name, int episode, int season) { TvShowBase show = this.showService.FindShowByName(name); if (show != null) { List <TvShowEpisode> episodesForShow = this.showService.GetEpisodesForSeason(show.id, season); foreach (TvShowEpisode showEpisode in episodesForShow) { if (showEpisode.episode == episode.ToString()) { string language = string.Empty; if (showEpisode.subsen) { language = "en"; } if (showEpisode.subsnl) { language = "nl"; } logger.WriteLine("Downloading {0} subtitles for {1}.", language, showEpisode.title); DownloadSubtitleForEpisode(showEpisode, language); if (string.IsNullOrEmpty(language)) { logger.WriteLine("No subtitles found for {0} from {1}", show.showName, showEpisode.title); } } } } else { logger.WriteLine("No shows found with name {0}", name); } }
public virtual bool TryGetShowById(int id, out TvShowBase tvShow) { ITvSeries bierdopje = channelFactory.CreateChannel(); using (Stream responseStream = bierdopje.GetShowById(id.ToString())) { string responseString = CreateStringFromStream(responseStream); CloseChannel(bierdopje); tvShow = responseParser.GetTvShow(responseString); return tvShow.id != 0; } }
public bool TryGetShowById(int showId, out TvShowBase show) { return service.TryGetShowById(showId, out show); }
public virtual bool TryGetShowByTvDbId(int tvDbId, out TvShowBase tvShow) { ITvShows bierdopjeService = CreateBierdopjeServiceChannel(); string responseString = bierdopjeService.GetShowByTvDbId(tvDbId.ToString()); tvShow = responseParser.GetTvShow(responseString); return tvShow.id != 0; }
public bool TryGetShowById(int showId, out TvShowBase show) { return(service.TryGetShowById(showId, out show)); }