Fix Tmdb - Aggiunta alla videoteca di Film in Collezione

This commit is contained in:
Alhaziel01
2022-12-02 09:52:05 +01:00
parent 5734e979a1
commit f1d0c5121d
+2 -1
View File
@@ -1396,6 +1396,7 @@ class Tmdb(object):
if collection: if collection:
_id = collection.get('id') _id = collection.get('id')
if _id: if _id:
translation = {}
url = '{}/collection/{}?api_key={}&language={}&append_to_response=images&include_image_language={},en,null'.format(host, _id, api, self.search_language, self.search_language) url = '{}/collection/{}?api_key={}&language={}&append_to_response=images&include_image_language={},en,null'.format(host, _id, api, self.search_language, self.search_language)
tanslationurl = '{}/collection/{}/translations?api_key={}'.format(host, _id, api) tanslationurl = '{}/collection/{}/translations?api_key={}'.format(host, _id, api)
info = self.get_json(url) info = self.get_json(url)
@@ -1405,7 +1406,7 @@ class Tmdb(object):
break break
ret['set'] = info.get('name') if info.get('name') else translation.get('name') ret['set'] = info.get('name') if info.get('name') else translation.get('name')
ret['setid'] = _id ret['setid'] = _id
ret['setoverview'] = info.get('overview') if info.get('overview') else translation.get('overview') ret['setoverview'] = info.get('overview') if info.get('overview') else translation.get('overview', '')
posters = ['https://image.tmdb.org/t/p/original' + info.get('poster_path')] if info.get('poster_path') else [] posters = ['https://image.tmdb.org/t/p/original' + info.get('poster_path')] if info.get('poster_path') else []
fanarts = ['https://image.tmdb.org/t/p/original' + info.get('backdrop_path')] if info.get('backdrop_path') else [] fanarts = ['https://image.tmdb.org/t/p/original' + info.get('backdrop_path')] if info.get('backdrop_path') else []
for image in info['images']['posters']: for image in info['images']['posters']: