Fix notifications Trakt "inactive" status not displayed when it should be.

Fix prevent waiting loops for deactivated accounts that can result in long loading times for the notification page on first time opened.
This commit is contained in:
Prinz23 2018-03-03 21:44:41 +01:00 committed by JackDandy
parent 4028a61dd6
commit 41206c2de7
2 changed files with 3 additions and 2 deletions

View file

@ -1490,7 +1490,7 @@
<option value="new" selected="selected">Add account</option>
#set $trakt_accounts = $sickbeard.TRAKT_ACCOUNTS
#for $void, $account in $trakt_accounts.items()
<option value="$account.account_id">$account.account_id - $account.name #if $account.active then '(ok)' else '(inactive)'#</option>
<option value="$account.account_id">$account.account_id - $account.name #if $account.active and $account.name then '(ok)' else '(inactive)'#</option>
#end for
</select>
<input type="button" class="btn" value="Delete" id="trakt-delete" disabled="disabled">

View file

@ -210,7 +210,8 @@ class TraktAPI:
return {}
# wait before retry
count > 1 and time.sleep(sleep_retry)
if 'users/settings' != path:
count > 1 and time.sleep(sleep_retry)
headers = headers or self.headers
if None is not send_oauth and send_oauth in sickbeard.TRAKT_ACCOUNTS: