alcuni fix
This commit is contained in:
@@ -195,10 +195,12 @@ def episodios(item):
|
||||
spl = it.url.split('/')[-2:]
|
||||
it.infoLabels['season'] = int(spl[0])+1
|
||||
it.infoLabels['episode'] = int(spl[1])+1
|
||||
it.url = it.url.replace('/watch-unsubscribed', '/watch-external')
|
||||
return it
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def check(item):
|
||||
if '/watch-unsubscribed' not in item.url:
|
||||
playWindow = support.match(support.httptools.downloadpage(item.url, cloudscraper=True).data, patron='playWindow" href="([^"]+)')
|
||||
@@ -208,13 +210,14 @@ def check(item):
|
||||
item.contentType = 'tvshow'
|
||||
return episodios(item)
|
||||
else:
|
||||
item.video_url = video_url.replace('/watch-unsubscribed', '/watch-external')
|
||||
item.url = video_url.replace('/watch-unsubscribed', '/watch-external')
|
||||
item.contentType = 'movie'
|
||||
return findvideos(item)
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
|
||||
itemlist.append(item.clone(action='play', url=support.match(item.video_url, patron='allowfullscreen[^<]+src="([^"]+)"', cloudscraper=True).match, quality=''))
|
||||
itemlist.append(item.clone(action='play', url=support.match(item.url, patron='allowfullscreen[^<]+src="([^"]+)"', cloudscraper=True).match, quality=''))
|
||||
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
|
||||
+6
-6
@@ -562,12 +562,12 @@ def scrape(func):
|
||||
prevthumb=item.prevthumb if item.prevthumb else item.thumbnail))
|
||||
|
||||
|
||||
# if inspect.stack()[1][3] not in ['find_episodes', 'add_tvshow']:
|
||||
# if addVideolibrary and (item.infoLabels["title"] or item.fulltitle):
|
||||
# # item.fulltitle = item.infoLabels["title"]
|
||||
# videolibrary(itemlist, item, function=function)
|
||||
# if downloadEnabled and function == 'episodios' or function == 'findvideos':
|
||||
# download(itemlist, item, function=function)
|
||||
if inspect.stack()[1][3] not in ['find_episodes', 'add_tvshow']:
|
||||
if addVideolibrary and (item.infoLabels["title"] or item.fulltitle):
|
||||
# item.fulltitle = item.infoLabels["title"]
|
||||
videolibrary(itemlist, item, function=function)
|
||||
if downloadEnabled and function == 'episodios' or function == 'findvideos':
|
||||
download(itemlist, item, function=function)
|
||||
|
||||
if 'patronGenreMenu' in args and itemlist:
|
||||
itemlist = thumb(itemlist, genre=True)
|
||||
|
||||
@@ -365,8 +365,8 @@ def render_items(itemlist, parent_item):
|
||||
episode = ''
|
||||
|
||||
if title[:1] not in ['[', '•']:
|
||||
if item.contentSerieName: title = item.contentSerieName
|
||||
elif item.contentTitle: title = item.contentTitle
|
||||
if item.contentTitle: title = item.contentTitle
|
||||
elif item.contentSerieName: title = item.contentSerieName
|
||||
if type(item.contentSeason) == int and type(item.contentEpisodeNumber) == int and not item.onlyep:
|
||||
episode = '{}x{:02d}'.format(item.contentSeason, item.contentEpisodeNumber)
|
||||
elif type(item.contentEpisodeNumber) == int:
|
||||
|
||||
@@ -105,7 +105,7 @@ def mainlist(item):
|
||||
# If there is any pending
|
||||
if 1 in estados or 0 in estados:
|
||||
itemlist.insert(0, Item(channel=item.channel, action="download_all", title=support.typo(config.get_localized_string(70220),'bold'),
|
||||
contentType=item.contentType, contentChannel=item.contentChannel, thumbnail=thumb('downloads'),
|
||||
contentType=item.contentType, contentChannel=item.contentChannel, thumbnail=thumb('download'),
|
||||
contentSerieName=item.contentSerieName))
|
||||
|
||||
if len(itemlist):
|
||||
|
||||
@@ -49,7 +49,25 @@ def search_list(item):
|
||||
|
||||
|
||||
def list_az(item):
|
||||
return [item.clone(title=i, action=item.next_action) for i in ['A','B','C','D','I','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']]
|
||||
videos = dict(videolibrarydb[item.contentType]).values()
|
||||
videolibrarydb.close()
|
||||
cast = []
|
||||
for v in videos:
|
||||
if item.next_action == 'list_actors':
|
||||
v = v['item'].infoLabels['castandrole']
|
||||
else:
|
||||
v = v['item'].infoLabels
|
||||
if 'director' in v:
|
||||
v = v.get('director').split(',')
|
||||
else:
|
||||
v= v.get('writer').split(',')
|
||||
cast += [c[0].strip() for c in v]
|
||||
|
||||
az = [] #[c[0] for c in cast if c[0] not in az]
|
||||
for c in cast:
|
||||
if c[0] not in az:
|
||||
az.append(c[0])
|
||||
return [item.clone(title=i, action=item.next_action) for i in az]#['A','B','C','D','I','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']]
|
||||
|
||||
|
||||
def list_genres(item):
|
||||
@@ -88,14 +106,18 @@ def list_directors(item):
|
||||
directors = []
|
||||
director_images = []
|
||||
for v in videos:
|
||||
directors += v['item'].infoLabels['director'].split(',')
|
||||
director_images += v['item'].infoLabels['director_image']
|
||||
|
||||
v = v['item'].infoLabels
|
||||
if 'director' in v:
|
||||
directors += v['director'].split(',')
|
||||
director_images += v['director_image']
|
||||
else:
|
||||
directors += v['writer'].split(',')
|
||||
director_images += v['writer_image']
|
||||
itemlist = []
|
||||
for i, d in enumerate(directors):
|
||||
d = d.strip()
|
||||
if d and d[0][0] == item.title and d not in [it.director for it in itemlist]:
|
||||
it = item.clone(title = d, action='list_{}s'.format(item.contentType), director=d, thumbnail=director_images[i])
|
||||
it = item.clone(title = d, action='list_{}s'.format(item.contentType), director=d, thumbnail=director_images[i] if len(director_images) > i else '')
|
||||
itemlist.append(it)
|
||||
|
||||
itemlist.sort(key=lambda it: it.director)
|
||||
@@ -284,9 +306,10 @@ def get_episodes(item):
|
||||
it = ep['item']
|
||||
|
||||
if it.contentSeason == item.contentSeason or item.all:
|
||||
it.title = '{}. {}'.format(it.contentEpisodeNumber, it.title)
|
||||
if config.get_setting('no_pile_on_seasons', 'videolibrary') == 2 or item.all:
|
||||
it.title = '{}x{}'.format(it.contentSeason, it.title)
|
||||
it.onlyep = False
|
||||
else:
|
||||
it.onlyep = True
|
||||
it = get_host(it)
|
||||
it.window = True if item.window_type == 0 or (config.get_setting("window_type") == 0) else False
|
||||
if it.window:
|
||||
@@ -955,7 +978,7 @@ def add_download_items(item, itemlist):
|
||||
from_action='findvideos',
|
||||
contentTitle=config.get_localized_string(60355),
|
||||
path=item.path,
|
||||
thumbnail=thumb('downloads'),
|
||||
thumbnail=thumb('download'),
|
||||
parent=item.tourl())
|
||||
if item.action == 'findvideos':
|
||||
if item.contentType != 'movie':
|
||||
|
||||
Reference in New Issue
Block a user