Commit ee7b8bcd authored by echel0n's avatar echel0n
Browse files

Release v9.3.6

parent c32702b0
# Changelog
- * 89d923a - 2018-04-18: Daily/Backlog searches now skip downloaded episodes with higher quality then show's set preferred or best. Daily searches skip downloaded episodes if archive on first match enabled.
- * 193d8cd - 2018-04-21: Release v9.3.6
- * c32702b - 2018-04-18: Daily/Backlog searches now skip downloaded episodes with higher quality then show's set preferred or best. Daily searches skip downloaded episodes if archive on first match enabled.
- * 9e76bc0 - 2018-04-15: Manual searches and Removal of shows now take extreme priority in queue
- * e8cea87 - 2018-04-15: Manual searches and Removal of shows now take extreme priority in queue
- * a7210e4 - 2018-04-15: Manual searches and Removal of shows now take extreme priority in queue
......
......@@ -98,16 +98,13 @@ class API(object):
def add_provider_cache_result(self, data):
self._request('POST', 'v1/providers/cache/results', json=data)
def get_provider_cache_results(self, provider, indexerid=None):
query = ('v1/providers/cache/results/{}'.format(provider),
'v1/providers/cache/results/{}/indexerids/{}'.format(provider, indexerid))[indexerid is not None]
def get_provider_cache_results(self, provider, indexerid, season, episode):
query = 'v1/providers/cache/results/{}/indexerid/{}/season/()/episode/()'.format(provider, indexerid, season,
episode)
return self._request('GET', query)
def get_torrent_cache_results(self, hash=None):
query = ('v1/torrents/cache/results',
'v1/torrents/cache/results/{}'.format(hash))[hash is not None]
def get_torrent_cache_results(self, hash):
query = 'v1/torrents/cache/results/{}'.format(hash)
return self._request('GET', query)
def add_torrent_cache_result(self, url):
......@@ -115,10 +112,8 @@ class API(object):
def search_by_imdb_title(self, title):
query = 'v1/imdb/search_by_title/{}'.format(title)
return self._request('GET', query)
def search_by_imdb_id(self, id):
query = 'v1/imdb/search_by_id/{}'.format(id)
return self._request('GET', query)
......@@ -247,7 +247,8 @@ class TVCache(object):
# get data from external database
if sickrage.app.config.enable_api_providers_cache and not self.provider.private:
try:
dbData += sickrage.app.api.get_provider_cache_results(self.providerID, ep_obj.show.indexerid)
dbData += sickrage.app.api.get_provider_cache_results(self.providerID, ep_obj.show.indexerid,
ep_obj.season, ep_obj.episode)
except Exception:
pass
......
......@@ -396,14 +396,16 @@ def searchProviders(show, episodes, manualSearch=False, downCurQuality=False, up
for providerID, providerObj in sickrage.app.search_providers.sort(
randomize=sickrage.app.config.randomize_providers).items():
# check provider type and provider is enabled
# check if provider is enabled
if not providerObj.isEnabled:
continue
# check provider type
if not sickrage.app.config.use_nzbs and providerObj.type in [NZBProvider.type, NewznabProvider.type]:
continue
elif not sickrage.app.config.use_torrents and providerObj.type in [TorrentProvider.type,
TorrentRssProvider.type]:
continue
elif not providerObj.isEnabled:
continue
if providerObj.anime_only and not show.is_anime:
sickrage.app.log.debug("" + str(show.name) + " is not an anime, skiping")
......@@ -411,7 +413,7 @@ def searchProviders(show, episodes, manualSearch=False, downCurQuality=False, up
foundResults[providerObj.name] = {}
searchCount = 0
search_count = 0
search_mode = providerObj.search_mode
# Always search for episode when manually searching when in sponly
......@@ -419,7 +421,7 @@ def searchProviders(show, episodes, manualSearch=False, downCurQuality=False, up
search_mode = 'eponly'
while True:
searchCount += 1
search_count += 1
try:
threading.currentThread().setName(origThreadName + "::[" + providerObj.name + "]")
......@@ -464,7 +466,7 @@ def searchProviders(show, episodes, manualSearch=False, downCurQuality=False, up
foundResults[providerObj.name][curEp].sort(key=lambda k: int(k.seeders), reverse=True)
break
elif not providerObj.search_fallback or searchCount == 2:
elif not providerObj.search_fallback or search_count == 2:
break
if search_mode == 'sponly':
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment