From 1b819493cb7096074a7bf586313f36c54546803a Mon Sep 17 00:00:00 2001 From: marco Date: Wed, 14 Oct 2020 22:43:37 +0200 Subject: [PATCH] image.tmdb.org sotto https --- core/tmdb.py | 18 +++++++++--------- platformcode/infoplus.py | 6 +++--- specials/community.py | 2 +- specials/search.py | 2 +- specials/tvmoviedb.py | 26 +++++++++++++------------- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/core/tmdb.py b/core/tmdb.py index e640e073..b17ff3f2 100644 --- a/core/tmdb.py +++ b/core/tmdb.py @@ -365,7 +365,7 @@ def set_infoLabels_item(item, seekTmdb=True, idioma_busqueda=def_lang, lock=None date = temporada['air_date'].split('-') item.infoLabels['aired'] = date[2] + "/" + date[1] + "/" + date[0] if 'poster_path' in temporada and temporada['poster_path']: - item.infoLabels['poster_path'] = 'http://image.tmdb.org/t/p/original' + temporada['poster_path'] + item.infoLabels['poster_path'] = 'https://image.tmdb.org/t/p/original' + temporada['poster_path'] item.thumbnail = item.infoLabels['poster_path'] # 4l3x87 - fix for overlap infoLabels if there is episode or season @@ -1229,7 +1229,7 @@ class Tmdb(object): if self.result["poster_path"] is None or self.result["poster_path"] == "": poster_path = "" else: - poster_path = 'http://image.tmdb.org/t/p/' + size + self.result["poster_path"] + poster_path = 'https://image.tmdb.org/t/p/' + size + self.result["poster_path"] if tipo_respuesta == 'str': return poster_path @@ -1250,7 +1250,7 @@ class Tmdb(object): size = "original" elif size[1] == 'h' and int(imagen_path['height']) < int(size[1:]): size = "original" - ret.append('http://image.tmdb.org/t/p/' + size + imagen_path) + ret.append('https://image.tmdb.org/t/p/' + size + imagen_path) else: ret.append(poster_path) @@ -1276,7 +1276,7 @@ class Tmdb(object): if self.result["backdrop_path"] is None or self.result["backdrop_path"] == "": backdrop_path = "" else: - backdrop_path = 'http://image.tmdb.org/t/p/' + size + self.result["backdrop_path"] + backdrop_path = 'https://image.tmdb.org/t/p/' + size + self.result["backdrop_path"] if tipo_respuesta == 'str': return backdrop_path @@ -1297,7 +1297,7 @@ class Tmdb(object): size = "original" elif size[1] == 'h' and int(imagen_path['height']) < int(size[1:]): size = "original" - ret.append('http://image.tmdb.org/t/p/' + size + imagen_path) + ret.append('https://image.tmdb.org/t/p/' + size + imagen_path) else: ret.append(backdrop_path) @@ -1396,7 +1396,7 @@ class Tmdb(object): else: ret_dic["temporada_air_date"] = "" if temporada["poster_path"]: - ret_dic["temporada_poster"] = 'http://image.tmdb.org/t/p/original' + temporada["poster_path"] + ret_dic["temporada_poster"] = 'https://image.tmdb.org/t/p/original' + temporada["poster_path"] else: ret_dic["temporada_poster"] = "" dic_aux = temporada.get('credits', {}) @@ -1426,7 +1426,7 @@ class Tmdb(object): ret_dic["episodio_vote_count"] = episodio["vote_count"] ret_dic["episodio_vote_average"] = episodio["vote_average"] if episodio["still_path"]: - ret_dic["episodio_imagen"] = 'http://image.tmdb.org/t/p/original' + episodio["still_path"] + ret_dic["episodio_imagen"] = 'https://image.tmdb.org/t/p/original' + episodio["still_path"] else: ret_dic["episodio_imagen"] = "" @@ -1564,10 +1564,10 @@ class Tmdb(object): ret_infoLabels['votes'] = v elif k == 'poster_path': - ret_infoLabels['thumbnail'] = 'http://image.tmdb.org/t/p/original' + v + ret_infoLabels['thumbnail'] = 'https://image.tmdb.org/t/p/original' + v elif k == 'backdrop_path': - ret_infoLabels['fanart'] = 'http://image.tmdb.org/t/p/original' + v + ret_infoLabels['fanart'] = 'https://image.tmdb.org/t/p/original' + v elif k == 'id': ret_infoLabels['tmdb_id'] = v diff --git a/platformcode/infoplus.py b/platformcode/infoplus.py index 4d8aaca8..faec9e0a 100644 --- a/platformcode/infoplus.py +++ b/platformcode/infoplus.py @@ -364,7 +364,7 @@ class ImagesWindow(xbmcgui.WindowDialog): self.image_list = [] for key, value in self.tmdb.items(): - for detail in value: self.image_list.append('http://image.tmdb.org/t/p/original' + detail["file_path"]) + for detail in value: self.image_list.append('https://image.tmdb.org/t/p/original' + detail["file_path"]) for image in self.imdb: self.image_list.append(image["src"]) for image, title in self.mal: self.image_list.append(image) for key, value in self.fanartv.items(): @@ -451,8 +451,8 @@ def get_recomendations(info): else: title = result.get("name", '') original_title = result.get("original_name", '') - thumbnail ='http://image.tmdb.org/t/p/w342' + result.get("poster_path", "") if result.get("poster_path", "") else '' - fanart = 'http://image.tmdb.org/t/p/original' + result.get("backdrop_path", "") if result.get("backdrop_path", "") else '' + thumbnail ='https://image.tmdb.org/t/p/w342' + result.get("poster_path", "") if result.get("poster_path", "") else '' + fanart = 'https://image.tmdb.org/t/p/original' + result.get("backdrop_path", "") if result.get("backdrop_path", "") else '' item = xbmcgui.ListItem(title) item.setProperties({'title': title, 'original_title': original_title, diff --git a/specials/community.py b/specials/community.py index 47e9735c..0c587ba9 100644 --- a/specials/community.py +++ b/specials/community.py @@ -581,7 +581,7 @@ def filter_thread(filter, key, item, description): results = tmdb_inf.results[0] id = results['id'] if id: - thumbnail = 'http://image.tmdb.org/t/p/original' + results['profile_path'] if results['profile_path'] else item.thumbnail + thumbnail = 'https://image.tmdb.org/t/p/original' + results['profile_path'] if results['profile_path'] else item.thumbnail json_file = httptools.downloadpage('http://api.themoviedb.org/3/person/'+ str(id) + '?api_key=' + tmdb_api + '&language=en', use_requests=True).data support.info(json_file) plot += jsontools.load(json_file)['biography'] diff --git a/specials/search.py b/specials/search.py index ca1a4a6b..a1a3ca4b 100644 --- a/specials/search.py +++ b/specials/search.py @@ -642,7 +642,7 @@ def actor_list(item): if t_k: plot = '%s in %s' % (rol, t_k) - thumbnail = 'http://image.tmdb.org/t/p/original%s' % elem.get('profile_path', '') + thumbnail = 'https://image.tmdb.org/t/p/original%s' % elem.get('profile_path', '') title = typo(name,'bold')+typo(rol,'_ [] color kod bold') discovery = {'url': 'person/%s/combined_credits' % cast_id, 'page': '1', diff --git a/specials/tvmoviedb.py b/specials/tvmoviedb.py index a8198422..baa0124a 100644 --- a/specials/tvmoviedb.py +++ b/specials/tvmoviedb.py @@ -312,7 +312,7 @@ def list_tmdb(item): if new_item.infoLabels['thumbnail']: new_item.thumbnail = new_item.infoLabels['thumbnail'] elif new_item.infoLabels['profile_path']: - new_item.thumbnail = 'http://image.tmdb.org/t/p/original' + new_item.infoLabels['profile_path'] + new_item.thumbnail = 'https://image.tmdb.org/t/p/original' + new_item.infoLabels['profile_path'] new_item.infoLabels['profile_path'] = '' new_item.plot = new_item.infoLabels["biography"] if not item.search.get('with_cast', '') and not item.search.get('with_crew', ''): @@ -345,7 +345,7 @@ def list_tmdb(item): new_item.title = typo(new_item.contentTitle, 'bold') + typo(known_for[random].get("title", known_for[random].get("name")), '_ () color kod') if known_for[random]["backdrop_path"]: - new_item.fanart = 'http://image.tmdb.org/t/p/original' + known_for[random]["backdrop_path"] + new_item.fanart = 'https://image.tmdb.org/t/p/original' + known_for[random]["backdrop_path"] else: new_item.title = new_item.contentTitle itemlist.append(new_item) @@ -470,9 +470,9 @@ def details(item): saga = ob_tmdb.result["belongs_to_collection"] new_item.infoLabels["tmdb_id"] = saga["id"] if saga["poster_path"]: - new_item.thumbnail = 'http://image.tmdb.org/t/p/original' + saga["poster_path"] + new_item.thumbnail = 'https://image.tmdb.org/t/p/original' + saga["poster_path"] if saga["backdrop_path"]: - new_item.fanart = 'http://image.tmdb.org/t/p/original' + saga["backdrop_path"] + new_item.fanart = 'https://image.tmdb.org/t/p/original' + saga["backdrop_path"] new_item.search = {'url': 'collection/%s' % saga['id'], 'language': langt} itemlist.append(new_item.clone(title=config.get_localized_string(70327) % saga["name"], action="list_tmdb")) except: @@ -503,7 +503,7 @@ def distribution(item): new_item = item.clone(action="list_tmdb", fanart=default_fan) new_item.title = " " + actor["name"] + " as " + actor["character"] if actor["profile_path"]: - new_item.thumbnail = 'http://image.tmdb.org/t/p/original' + actor["profile_path"] + new_item.thumbnail = 'https://image.tmdb.org/t/p/original' + actor["profile_path"] if item.contentType == "movie": new_item.search = {'url': 'discover/movie', 'with_cast': actor['id'], 'language': langt, 'page': 1, @@ -522,7 +522,7 @@ def distribution(item): new_item = item.clone(action="list_tmdb", fanart=default_fan) new_item.title = " " + c["job"] + ": " + c["name"] if c["profile_path"]: - new_item.thumbnail = 'http://image.tmdb.org/t/p/original' + c["profile_path"] + new_item.thumbnail = 'https://image.tmdb.org/t/p/original' + c["profile_path"] if item.contentType == "movie": new_item.search = {'url': 'discover/movie', 'with_crew': c['id'], 'page': 1,'sort_by': 'primary_release_date.desc'} else: @@ -553,7 +553,7 @@ def info_seasons(item): new_item.infoLabels['aired'] = date[2] + "/" + date[1] + "/" + date[0] new_item.infoLabels['year'] = date[0] if temporada['poster_path']: - new_item.infoLabels['poster_path'] = 'http://image.tmdb.org/t/p/original' + temporada['poster_path'] + new_item.infoLabels['poster_path'] = 'https://image.tmdb.org/t/p/original' + temporada['poster_path'] new_item.thumbnail = new_item.infoLabels['poster_path'] new_item.title = config.get_localized_string(60027) % temp itemlist.append(new_item) @@ -1372,9 +1372,9 @@ def indices_imdb(item): # saga = ob_tmdb.result["belongs_to_collection"] # new_item.infoLabels["tmdb_id"] = saga["id"] # if saga["poster_path"]: -# new_item.thumbnail = 'http://image.tmdb.org/t/p/original' + saga["poster_path"] +# new_item.thumbnail = 'https://image.tmdb.org/t/p/original' + saga["poster_path"] # if saga["backdrop_path"]: -# new_item.fanart = 'http://image.tmdb.org/t/p/original' + saga["backdrop_path"] +# new_item.fanart = 'https://image.tmdb.org/t/p/original' + saga["backdrop_path"] # new_item.search = {'url': 'collection/%s' % saga['id'], 'language': langt} # new_item.title = config.get_localized_string(70327) % saga["name"] # itemlist.append(new_item) @@ -1769,8 +1769,8 @@ def imagenes(item): if item.folder: for tipo, child in value.iteritems(): for i, imagen in enumerate(child): - thumb = 'http://image.tmdb.org/t/p/w500' + imagen["file_path"] - fanart = 'http://image.tmdb.org/t/p/original' + imagen["file_path"] + thumb = 'https://image.tmdb.org/t/p/w500' + imagen["file_path"] + fanart = 'https://image.tmdb.org/t/p/original' + imagen["file_path"] title = " %s %s [%sx%s]" % (tipo.capitalize(), i + 1, imagen["width"], imagen["height"]) itemlist.append(Item(channel=item.channel, action="", thumbnail=thumb, fanart=fanart, title=title, infoLabels=item.infoLabels)) @@ -2250,9 +2250,9 @@ def details_mal(item): saga = ob_tmdb.result["belongs_to_collection"] new_item.infoLabels["tmdb_id"] = saga["id"] if saga["poster_path"]: - new_item.thumbnail = 'http://image.tmdb.org/t/p/original' + saga["poster_path"] + new_item.thumbnail = 'https://image.tmdb.org/t/p/original' + saga["poster_path"] if saga["backdrop_path"]: - new_item.fanart = 'http://image.tmdb.org/t/p/original' + saga["backdrop_path"] + new_item.fanart = 'https://image.tmdb.org/t/p/original' + saga["backdrop_path"] new_item.search = {'url': 'collection/%s' % saga['id'], 'language': langt} new_item.title = config.get_localized_string(70327) % saga["name"] itemlist.append(new_item)