public Episode FindByEpisodeForComparingDto(EpisodeForComparingDto epForComparing) { TVShowService tvshowService = new TVShowService(_context); TVShow show = tvshowService.FindByName(epForComparing.SeriesName); if (show != null) { return(_context.Episodes .FirstOrDefault(b => b.SeriesId == show.SeriesId && b.Season == epForComparing.SeasonNumber && b.AiredEpisodeNumber == epForComparing.EpisodeNumberInSeason)); } else { return(null); } }
public RenamerFacade(TVDBRetrieverService retrieverService, TVShowService showService, EpisodeService episodeService, LocalMediaService localService, EpisodeContext context, IRenamePrompter prompter, string tvdbPath) { _retrieverService = retrieverService; _showService = showService; _episodeService = episodeService; _localservice = localService; _context = context; _tvdbInfoFilePath = tvdbPath; _prompter = prompter; _tvdbInfo = TVDBInfo.ReadFromFile(_tvdbInfoFilePath); }