|
|
|
@ -92,9 +92,16 @@ namespace PlexRequests.Api
|
|
|
|
|
var seasonIncrement = 0;
|
|
|
|
|
var seasonList = new SickRageSeasonList();
|
|
|
|
|
Log.Trace("while (seasonIncrement < seasonCount) where seasonCount = {0}", seasonCount);
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
while (seasonIncrement < seasonCount)
|
|
|
|
|
{
|
|
|
|
|
seasonList = VerifyShowHasLoaded(tvdbId, apiKey, baseUrl);
|
|
|
|
|
if (seasonList.result.Equals("failure"))
|
|
|
|
|
{
|
|
|
|
|
Thread.Sleep(3000);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
seasonIncrement = seasonList.Data?.Length ?? 0;
|
|
|
|
|
Log.Trace("New seasonIncrement -> {0}", seasonIncrement);
|
|
|
|
|
|
|
|
|
@ -106,6 +113,12 @@ namespace PlexRequests.Api
|
|
|
|
|
}
|
|
|
|
|
sw.Stop();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
Log.Error("Exception thrown when getting the seasonList");
|
|
|
|
|
Log.Error(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Log.Trace("seasons.Length > 0 where seasons.Len -> {0}", seasons.Length);
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|