mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
fixed episodeservice.updatemany
This commit is contained in:
parent
6c1d16ae57
commit
287dedadea
@ -164,7 +164,7 @@ public void InsertMany(List<Episode> episodes)
|
||||
|
||||
public void UpdateMany(List<Episode> episodes)
|
||||
{
|
||||
_episodeRepository.InsertMany(episodes);
|
||||
_episodeRepository.UpdateMany(episodes);
|
||||
}
|
||||
|
||||
public void HandleAsync(SeriesDeletedEvent message)
|
||||
|
@ -99,13 +99,9 @@ private void RefreshEpisodeInfo(Series series, List<Episode> remoteEpisodes)
|
||||
{
|
||||
_logger.Trace("Updating info for [{0}] - S{1:00}E{2:00}", series.Title, episode.SeasonNumber, episode.EpisodeNumber);
|
||||
|
||||
var episodeToUpdate = seriesEpisodes.SingleOrDefault(e => e.TvDbEpisodeId == episode.TvDbEpisodeId);
|
||||
|
||||
//not found, try using season/episode number
|
||||
if (episodeToUpdate == null)
|
||||
{
|
||||
episodeToUpdate = seriesEpisodes.SingleOrDefault(e => e.SeasonNumber == episode.SeasonNumber && e.EpisodeNumber == episode.EpisodeNumber);
|
||||
}
|
||||
var episodeToUpdate = seriesEpisodes.SingleOrDefault(e =>
|
||||
e.TvDbEpisodeId == episode.TvDbEpisodeId ||
|
||||
(e.SeasonNumber == episode.SeasonNumber && e.EpisodeNumber == episode.EpisodeNumber));
|
||||
|
||||
if (episodeToUpdate == null)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user