diff --git a/CHANGES.md b/CHANGES.md index 66ad5a4c..b09541a7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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) diff --git a/gui/slick/interfaces/default/home_newShow.tmpl b/gui/slick/interfaces/default/home_newShow.tmpl index 756c1ac3..361f9de2 100644 --- a/gui/slick/interfaces/default/home_newShow.tmpl +++ b/gui/slick/interfaces/default/home_newShow.tmpl @@ -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 + @@ -39,6 +41,7 @@
+ #if $use_provided_info #set $provided_indexer_local = $provided_indexer diff --git a/gui/slick/js/newShow.js b/gui/slick/js/newShow.js index 0abfbd2e..c1e7ece3 100644 --- a/gui/slick/js/newShow.js +++ b/gui/slick/js/newShow.js @@ -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'); diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index bd98dab3..b90bfd0c 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -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: