Fix Support Server e migliorie StreamingCommunity
This commit is contained in:
@@ -57,7 +57,7 @@ def genres(item):
|
|||||||
|
|
||||||
|
|
||||||
def search(item, text):
|
def search(item, text):
|
||||||
logger.debug('search', item)
|
logger.debug('search', text)
|
||||||
item.search = text
|
item.search = text
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -140,19 +140,20 @@ def makeItem(n, it, item):
|
|||||||
if not lang:
|
if not lang:
|
||||||
lang = 'ITA'
|
lang = 'ITA'
|
||||||
itm = item.clone(title=support.typo(title,'bold') + support.typo(lang,'_ [] color kod bold'))
|
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.language = lang
|
||||||
|
itm.year = info['release_date'].split('-')[0]
|
||||||
|
|
||||||
|
|
||||||
if itm.type == 'movie':
|
if itm.contentType == 'movie':
|
||||||
itm.contentType = 'movie'
|
# itm.contentType = 'movie'
|
||||||
itm.fulltitle = itm.show = itm.contentTitle = title
|
itm.fulltitle = itm.show = itm.contentTitle = title
|
||||||
itm.contentTitle = ''
|
itm.contentTitle = ''
|
||||||
itm.action = 'findvideos'
|
itm.action = 'findvideos'
|
||||||
itm.url = host + '/watch/%s' % it['id']
|
itm.url = host + '/watch/%s' % it['id']
|
||||||
|
|
||||||
else:
|
else:
|
||||||
itm.contentType = 'tvshow'
|
# itm.contentType = 'tvshow'
|
||||||
itm.contentTitle = ''
|
itm.contentTitle = ''
|
||||||
itm.fulltitle = itm.show = itm.contentSerieName = title
|
itm.fulltitle = itm.show = itm.contentSerieName = title
|
||||||
itm.action = 'episodios'
|
itm.action = 'episodios'
|
||||||
@@ -167,22 +168,21 @@ def episodios(item):
|
|||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
js = json.loads(support.match(item.url, patron=r'seasons="([^"]+)').match.replace('"','"'))
|
js = json.loads(support.match(item.url, patron=r'seasons="([^"]+)').match.replace('"','"'))
|
||||||
logger.debug(js)
|
|
||||||
|
|
||||||
for episodes in js:
|
for episodes in js:
|
||||||
for it in episodes['episodes']:
|
for it in episodes['episodes']:
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
support.Item(channel=item.channel,
|
support.Item(channel=item.channel,
|
||||||
title=support.typo(str(episodes['number']) + 'x' + str(it['number']).zfill(2) + ' - ' + it['name'], 'bold'),
|
title=support.typo(str(episodes['number']) + 'x' + str(it['number']).zfill(2) + ' - ' + it['name'], 'bold'),
|
||||||
episode = it['number'],
|
episode = it['number'],
|
||||||
season=episodes['number'],
|
season=episodes['number'],
|
||||||
thumbnail=item.thumbnail,
|
thumbnail=it['images'][0]['original_url'] if 'images' in it and 'original_url' in it['images'][0] else item.thumbnail,
|
||||||
fanart=item.fanart,
|
fanart=item.fanart,
|
||||||
plot=it['plot'],
|
plot=it['plot'],
|
||||||
action='findvideos',
|
action='findvideos',
|
||||||
contentType='episode',
|
contentType='episode',
|
||||||
contentSerieName=item.fulltitle,
|
contentSerieName=item.fulltitle,
|
||||||
url=host + '/watch/' + str(episodes['title_id']) + '?e=' + str(it['id'])))
|
url=host + '/watch/' + str(episodes['title_id']) + '?e=' + str(it['id'])))
|
||||||
|
|
||||||
support.videolibrary(itemlist, item)
|
support.videolibrary(itemlist, item)
|
||||||
support.download(itemlist, item)
|
support.download(itemlist, item)
|
||||||
|
|||||||
+4
-4
@@ -1155,10 +1155,10 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru
|
|||||||
verifiedItemlist = []
|
verifiedItemlist = []
|
||||||
|
|
||||||
def getItem(videoitem):
|
def getItem(videoitem):
|
||||||
if not videoitem.server:
|
# if not videoitem.server:
|
||||||
s = servertools.get_server_from_url(videoitem.url)
|
# s = servertools.get_server_from_url(videoitem.url)
|
||||||
videoitem.server = s[2] if s else 'directo'
|
# videoitem.server = s[2] if s else 'directo'
|
||||||
videoitem.title = s[0] if s else config.get_localized_string(30137)
|
# videoitem.title = s[0] if s else config.get_localized_string(30137)
|
||||||
srv_param = servertools.get_server_parameters(videoitem.server.lower())
|
srv_param = servertools.get_server_parameters(videoitem.server.lower())
|
||||||
if not srv_param: # do not exists or it's empty
|
if not srv_param: # do not exists or it's empty
|
||||||
findS = servertools.get_server_from_url(videoitem.url)
|
findS = servertools.get_server_from_url(videoitem.url)
|
||||||
|
|||||||
Reference in New Issue
Block a user