mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-14 09:12:57 -07:00
Fixed the SickRage/Medusa Issue where it was always being set as Skipped/Ignore #2084
This commit is contained in:
parent
c354efb500
commit
3be460ea3b
1 changed files with 9 additions and 1 deletions
|
@ -314,9 +314,17 @@ namespace Ombi.Core.Senders
|
||||||
foreach (var seasonRequests in model.SeasonRequests)
|
foreach (var seasonRequests in model.SeasonRequests)
|
||||||
{
|
{
|
||||||
var srEpisodes = await SickRageApi.GetEpisodesForSeason(tvdbid, seasonRequests.SeasonNumber, settings.ApiKey, settings.FullUri);
|
var srEpisodes = await SickRageApi.GetEpisodesForSeason(tvdbid, seasonRequests.SeasonNumber, settings.ApiKey, settings.FullUri);
|
||||||
while (srEpisodes.message.Equals("Show not found", StringComparison.CurrentCultureIgnoreCase) && srEpisodes.data.Count <= 0)
|
int retryTimes = 10;
|
||||||
|
var currentRetry = 0;
|
||||||
|
while (srEpisodes.message.Equals("Show not found", StringComparison.CurrentCultureIgnoreCase) || srEpisodes.message.Equals("Season not found", StringComparison.CurrentCultureIgnoreCase) && srEpisodes.data.Count <= 0)
|
||||||
{
|
{
|
||||||
|
if (currentRetry > retryTimes)
|
||||||
|
{
|
||||||
|
Logger.LogWarning("Couldnt find the SR Season or Show, message: {0}", srEpisodes.message);
|
||||||
|
break;
|
||||||
|
}
|
||||||
await Task.Delay(TimeSpan.FromSeconds(1));
|
await Task.Delay(TimeSpan.FromSeconds(1));
|
||||||
|
currentRetry++;
|
||||||
srEpisodes = await SickRageApi.GetEpisodesForSeason(tvdbid, seasonRequests.SeasonNumber, settings.ApiKey, settings.FullUri);
|
srEpisodes = await SickRageApi.GetEpisodesForSeason(tvdbid, seasonRequests.SeasonNumber, settings.ApiKey, settings.FullUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue