KoD 0.8.1
- riorganizzate le impostazioni - aggiunte descrizioni tag qualità su cb01 (presto anche sugli altri) - aggiunto il supporto alle serie di polpotv - fixato server mystream - fix Rinumerazione per episodi Nuovi
This commit is contained in:
+39
-8
@@ -168,7 +168,14 @@ def peliculas(item, json='', key='', itemlist=[]):
|
||||
itlist = filterkey = []
|
||||
action = 'findvideos'
|
||||
|
||||
for option in json:
|
||||
if inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes', 'search']:
|
||||
Pagination = int(defp) if defp.isdigit() else ''
|
||||
else: Pagination = ''
|
||||
pag = item.page if item.page else 1
|
||||
|
||||
for i, option in enumerate(json):
|
||||
if Pagination and (pag - 1) * Pagination > i: continue # pagination
|
||||
if Pagination and i >= pag * Pagination: break
|
||||
if item.filterkey and item.filterkey in option:
|
||||
filterkey = [it.lower() for it in option[item.filterkey]] if type(option[item.filterkey]) == list else [option[item.filterkey].lower()]
|
||||
title = option['title'] if 'title' in option else ''
|
||||
@@ -203,7 +210,13 @@ def peliculas(item, json='', key='', itemlist=[]):
|
||||
if not 'generic_list' in key:
|
||||
tmdb.set_infoLabels(itlist, seekTmdb=True)
|
||||
itemlist += itlist
|
||||
itemlist = pagination(item, itemlist)
|
||||
|
||||
if Pagination and len(itemlist) >= Pagination:
|
||||
if inspect.stack()[1][3] != 'get_newest':
|
||||
item.title = support.typo(config.get_localized_string(30992), 'color kod bold')
|
||||
item.page = pag + 1
|
||||
item.thumbnail = support.thumb()
|
||||
itemlist.append(item)
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -259,8 +272,16 @@ def episodios(item, json ='', key='', itemlist =[]):
|
||||
# set variable
|
||||
ep = 1
|
||||
season = infoLabels['season'] if 'season' in infoLabels else item.contentSeason if item.contentSeason else 1
|
||||
|
||||
if inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes', 'search']:
|
||||
Pagination = int(defp) if defp.isdigit() else ''
|
||||
else: Pagination = ''
|
||||
pag = item.page if item.page else 1
|
||||
|
||||
# make items
|
||||
for option in json:
|
||||
for i, option in enumerate(json):
|
||||
if Pagination and (pag - 1) * Pagination > i: continue # pagination
|
||||
if Pagination and i >= pag * Pagination: break
|
||||
# build numeration of episodes
|
||||
numeration = option['number'] if 'number' in option else option['title']
|
||||
match = support.match(numeration , patron=r'(?P<season>\d+)x(?P<episode>\d+)').match
|
||||
@@ -300,7 +321,7 @@ def episodios(item, json ='', key='', itemlist =[]):
|
||||
path = item.path))
|
||||
|
||||
# if showseason
|
||||
if inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes', 'get_newest']:
|
||||
if inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes', 'get_newest', 'search']:
|
||||
if show_seasons and not item.filterseason:
|
||||
itm.contentType='season'
|
||||
season_list = []
|
||||
@@ -320,8 +341,14 @@ def episodios(item, json ='', key='', itemlist =[]):
|
||||
infoLabels=infoLabels,
|
||||
filterseason=str(season),
|
||||
path=item.path))
|
||||
|
||||
elif defpage and inspect.stack()[1][3] not in ['get_seasons']:
|
||||
itemlist = pagination(item, itemlist)
|
||||
if Pagination and len(itemlist) >= Pagination:
|
||||
if inspect.stack()[1][3] != 'get_newest':
|
||||
item.title = support.typo(config.get_localized_string(30992), 'color kod bold')
|
||||
item.page = pag + 1
|
||||
item.thumbnail = support.thumb()
|
||||
itemlist.append(item)
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -449,7 +476,11 @@ def get_search_menu(item, json='', itemlist=[], channel_name=''):
|
||||
|
||||
|
||||
def submenu(item, json, key, itemlist = []):
|
||||
from lib.concurrent import futures
|
||||
import sys
|
||||
if sys.version_info[0] >= 3:
|
||||
from concurrent import futures
|
||||
else:
|
||||
from concurrent_py2 import futures
|
||||
|
||||
filter_list = []
|
||||
for option in json[key]:
|
||||
@@ -632,7 +663,7 @@ def pagination(item, itemlist = []):
|
||||
encoded_itemlist = []
|
||||
for it in itemlist:
|
||||
encoded_itemlist.append(it.tourl())
|
||||
if inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes']:
|
||||
if inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes', 'search']:
|
||||
Pagination = int(defp) if defp.isdigit() else ''
|
||||
else: Pagination = ''
|
||||
pag = item.page if item.page else 1
|
||||
@@ -643,7 +674,7 @@ def pagination(item, itemlist = []):
|
||||
|
||||
itlist.append(item)
|
||||
|
||||
if Pagination and len(itemlist) > pag * Pagination:
|
||||
if Pagination and len(itemlist) >= Pagination:
|
||||
if inspect.stack()[1][3] != 'get_newest':
|
||||
itlist.append(
|
||||
Item(channel=item.channel,
|
||||
|
||||
Reference in New Issue
Block a user