|
|
@ -57,6 +57,10 @@ namespace Ombi.Schedule.Jobs.Sonarr
|
|
|
|
await _ctx.Database.ExecuteSqlCommandAsync("DELETE FROM SonarrEpisodeCache");
|
|
|
|
await _ctx.Database.ExecuteSqlCommandAsync("DELETE FROM SonarrEpisodeCache");
|
|
|
|
foreach (var s in sonarrSeries)
|
|
|
|
foreach (var s in sonarrSeries)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!s.monitored)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
_log.LogDebug("Syncing series: {0}", s.title);
|
|
|
|
_log.LogDebug("Syncing series: {0}", s.title);
|
|
|
|
var episodes = await _api.GetEpisodes(s.id, settings.ApiKey, settings.FullUri);
|
|
|
|
var episodes = await _api.GetEpisodes(s.id, settings.ApiKey, settings.FullUri);
|
|
|
|
var monitoredEpisodes = episodes.Where(x => x.monitored || x.hasFile);
|
|
|
|
var monitoredEpisodes = episodes.Where(x => x.monitored || x.hasFile);
|
|
|
|