Browse Source

Merge branch 'master' into develop

tags/release_0.25.1
JackDandy 5 years ago
parent
commit
deb78116c6
  1. 5
      CHANGES.md
  2. 6
      sickbeard/webapi.py

5
CHANGES.md

@ -95,6 +95,11 @@
* Change improve log clarity of anime group validation and fix its validation
### 0.21.42 (2020-08-04 15:45:00 UTC)
* Fix SickBeard search API compatibility issue
### 0.21.41 (2020-07-31 09:25:00 UTC)
* Update NZBGet extension 2.5 to 2.6

6
sickbeard/webapi.py

@ -2532,6 +2532,7 @@ class CMD_SickGearSearchIndexers(ApiCall):
raise ApiError('Mix of -1 (all Indexer) and specific Indexer not allowed')
all_indexer = 1 == len(self.indexers) and -1 == self.indexers[0]
lang_id = self.valid_languages['en']
if self.name and not self.prodid: # only name was given
results = []
@ -2570,12 +2571,11 @@ class CMD_SickGearSearchIndexers(ApiCall):
results = sorted(results, key=lambda x: x['relevance'], reverse=True)
return _responds(RESULT_SUCCESS, {"results": results, "langid": 'en'})
return _responds(RESULT_SUCCESS, {"results": results, "langid": lang_id, "lang": 'en'})
elif self.prodid and not all_indexer and 1 == len(self.indexers):
tvinfo_config = sickbeard.TVInfoAPI(self.indexers[0]).api_params.copy()
lang_id = 'en'
tvinfo_config['language'] = 'en'
tvinfo_config['custom_ui'] = classes.AllShowInfosNoFilterListUI
@ -2609,7 +2609,7 @@ class CMD_SickGearSearchIndexers(ApiCall):
showOut[0]["tvdbid"] = None
showOut = sorted(showOut, key=lambda x: x['relevance'], reverse=True)
return _responds(RESULT_SUCCESS, {"results": showOut, "langid": lang_id})
return _responds(RESULT_SUCCESS, {"results": showOut, "langid": lang_id, "lang": 'en'})
else:
return _responds(RESULT_FAILURE, msg="Either indexer + indexerid or name is required")

Loading…
Cancel
Save