From e3bf1f1cef67e56a0dfffc89d95f382ab1ff6e2a Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Thu, 14 Jan 2021 15:53:36 +0100 Subject: [PATCH] Fix Support Server e migliorie StreamingCommunity --- channels/streamingcommunity.py | 32 ++++++++++++++++---------------- core/support.py | 8 ++++---- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/channels/streamingcommunity.py b/channels/streamingcommunity.py index 29a19853..dfdfbc85 100644 --- a/channels/streamingcommunity.py +++ b/channels/streamingcommunity.py @@ -57,7 +57,7 @@ def genres(item): def search(item, text): - logger.debug('search', item) + logger.debug('search', text) item.search = text try: @@ -140,19 +140,20 @@ def makeItem(n, it, item): if not lang: lang = 'ITA' itm = item.clone(title=support.typo(title,'bold') + support.typo(lang,'_ [] color kod bold')) - itm.type = info['type'] + itm.contentType = info['type'].replace('tv', 'tvshow') itm.language = lang + itm.year = info['release_date'].split('-')[0] - if itm.type == 'movie': - itm.contentType = 'movie' + if itm.contentType == 'movie': + # itm.contentType = 'movie' itm.fulltitle = itm.show = itm.contentTitle = title itm.contentTitle = '' itm.action = 'findvideos' itm.url = host + '/watch/%s' % it['id'] else: - itm.contentType = 'tvshow' + # itm.contentType = 'tvshow' itm.contentTitle = '' itm.fulltitle = itm.show = itm.contentSerieName = title itm.action = 'episodios' @@ -167,22 +168,21 @@ def episodios(item): itemlist = [] js = json.loads(support.match(item.url, patron=r'seasons="([^"]+)').match.replace('"','"')) - logger.debug(js) for episodes in js: for it in episodes['episodes']: itemlist.append( support.Item(channel=item.channel, - title=support.typo(str(episodes['number']) + 'x' + str(it['number']).zfill(2) + ' - ' + it['name'], 'bold'), - episode = it['number'], - season=episodes['number'], - thumbnail=item.thumbnail, - fanart=item.fanart, - plot=it['plot'], - action='findvideos', - contentType='episode', - contentSerieName=item.fulltitle, - url=host + '/watch/' + str(episodes['title_id']) + '?e=' + str(it['id']))) + title=support.typo(str(episodes['number']) + 'x' + str(it['number']).zfill(2) + ' - ' + it['name'], 'bold'), + episode = it['number'], + season=episodes['number'], + thumbnail=it['images'][0]['original_url'] if 'images' in it and 'original_url' in it['images'][0] else item.thumbnail, + fanart=item.fanart, + plot=it['plot'], + action='findvideos', + contentType='episode', + contentSerieName=item.fulltitle, + url=host + '/watch/' + str(episodes['title_id']) + '?e=' + str(it['id']))) support.videolibrary(itemlist, item) support.download(itemlist, item) diff --git a/core/support.py b/core/support.py index 32484490..3be458cc 100755 --- a/core/support.py +++ b/core/support.py @@ -1155,10 +1155,10 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru verifiedItemlist = [] def getItem(videoitem): - if not videoitem.server: - s = servertools.get_server_from_url(videoitem.url) - videoitem.server = s[2] if s else 'directo' - videoitem.title = s[0] if s else config.get_localized_string(30137) + # if not videoitem.server: + # s = servertools.get_server_from_url(videoitem.url) + # videoitem.server = s[2] if s else 'directo' + # videoitem.title = s[0] if s else config.get_localized_string(30137) srv_param = servertools.get_server_parameters(videoitem.server.lower()) if not srv_param: # do not exists or it's empty findS = servertools.get_server_from_url(videoitem.url)