Merge pull request #816 from JackDandy/feature/ChangeAddNewShowTimeouts

Change retry sleep timeout for Trakt searches to prevent issues when …
This commit is contained in:
JackDandy 2016-11-01 17:09:19 +00:00 committed by GitHub
commit 3ffefb9f0f
4 changed files with 6 additions and 2 deletions

View file

@ -220,6 +220,7 @@
* Change improve reverse proxy web_root support
* Fix "error trying to retrieve image" from tvdb due to there is no image to fetch
* Fix PiSexy for vip user class
* Change retry sleep timeout for Trakt searches to prevent issues when Trakt is down
### 0.11.16 (2016-10-16 17:30:00 UTC)

View file

@ -10,6 +10,8 @@
#import os.path
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl')
#set indexer_count = len([$i for $i in $sickbeard.indexerApi().indexers if $sickbeard.indexerApi(i).config.get('active', False) and not $sickbeard.indexerApi(i).config.get('defunct', False)]) + 1
<script>
var show_scene_maps = ${show_scene_maps}
</script>
@ -39,6 +41,7 @@
<div class="stepDiv">
<input type="hidden" id="indexer_timeout" value="$sickbeard.INDEXER_TIMEOUT" />
<input type="hidden" id="indexer_count" value="$indexer_count" />
#if $use_provided_info
#set $provided_indexer_local = $provided_indexer

View file

@ -66,7 +66,7 @@ $(document).ready(function () {
'lang': elIndexerLang.val(),
'indexer': elTvDatabase.val()
},
timeout: parseInt($('#indexer_timeout').val(), 10) * 1000,
timeout: parseInt($('#indexer_timeout').val(), 10) * parseInt($('#indexer_count').val(), 2) * 1000 + 15000,
dataType: 'json',
error: function () {
$('#searchResults').empty().html('search timed out, try again or try another database');

View file

@ -2426,7 +2426,7 @@ class NewHomeAddShows(Home):
filtered = []
try:
resp = TraktAPI().trakt_request(url)
resp = TraktAPI().trakt_request(url, sleep_retry=5)
if len(resp):
filtered = resp
except TraktException as e: