KoD 1.3.1
- aggiunti nuovi canali: film4k, animealtadefinizione, streamingcommunity, animeuniverse , guardaserieICU - HDmario ora supporta l'utilizzo di account - Miglioramenti sezione news, è ora possibile raggruppare per canale o per contenuto, e settare l'ordinamento - risolto il fastidioso problema per cui poteva capitare che la ricerca ripartisse dopo un refresh di kodi (tipicamente quando l'aggiornamento della videoteca finiva) - alcuni fix ai canali
This commit is contained in:
+19
-11
@@ -255,7 +255,7 @@ def get_seasons(item):
|
||||
action='episodios',
|
||||
contentSeason=option['season'],
|
||||
infoLabels=infoLabels,
|
||||
contentType='season',
|
||||
contentType='season' if show_seasons else 'tvshow',
|
||||
path=extra.path))
|
||||
|
||||
if inspect.stack()[2][3] in ['add_tvshow', 'get_episodes', 'update', 'find_episodes', 'get_newest'] or show_seasons == False:
|
||||
@@ -265,6 +265,10 @@ def get_seasons(item):
|
||||
itemlist = itlist
|
||||
if inspect.stack()[2][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes', 'get_newest'] and defp and not item.disable_pagination:
|
||||
itemlist = pagination(item, itemlist)
|
||||
|
||||
if show_seasons:
|
||||
support.videolibrary(itemlist, item)
|
||||
support.download(itemlist, item)
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -353,16 +357,17 @@ def episodios(item, json ='', key='', itemlist =[]):
|
||||
itemlist = []
|
||||
for season in season_list:
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
title=set_title(config.get_localized_string(60027) % season),
|
||||
fulltitle=itm.fulltitle,
|
||||
show=itm.show,
|
||||
thumbnails=itm.thumbnails,
|
||||
url=itm.url,
|
||||
action='episodios',
|
||||
contentSeason=season,
|
||||
infoLabels=infoLabels,
|
||||
filterseason=str(season),
|
||||
path=item.path))
|
||||
title=set_title(config.get_localized_string(60027) % season),
|
||||
fulltitle=itm.fulltitle,
|
||||
show=itm.show,
|
||||
thumbnails=itm.thumbnails,
|
||||
url=itm.url,
|
||||
action='episodios',
|
||||
contentSeason=season,
|
||||
contentType = 'episode',
|
||||
infoLabels=infoLabels,
|
||||
filterseason=str(season),
|
||||
path=item.path))
|
||||
|
||||
elif defp and inspect.stack()[1][3] not in ['get_seasons'] and not item.disable_pagination:
|
||||
if Pagination and len(itemlist) >= Pagination:
|
||||
@@ -371,6 +376,9 @@ def episodios(item, json ='', key='', itemlist =[]):
|
||||
item.page = pag + 1
|
||||
item.thumbnail = support.thumb()
|
||||
itemlist.append(item)
|
||||
if not show_seasons:
|
||||
support.videolibrary(itemlist, item)
|
||||
support.download(itemlist, item)
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
@@ -840,7 +840,7 @@ def start_download(item):
|
||||
|
||||
def get_episodes(item):
|
||||
log("contentAction: %s | contentChannel: %s | contentType: %s" % (item.contentAction, item.contentChannel, item.contentType))
|
||||
|
||||
|
||||
if 'dlseason' in item:
|
||||
season = True
|
||||
season_number = item.dlseason
|
||||
@@ -864,8 +864,9 @@ def get_episodes(item):
|
||||
episodes = getattr(channel, item.contentAction)(item)
|
||||
|
||||
itemlist = []
|
||||
if episodes and not scrapertools.find_single_match(episodes[0].title, r'(\d+.\d+)') and item.channel not in ['videolibrary']:
|
||||
if episodes and not scrapertools.find_single_match(episodes[0].title, r'(\d+.\d+)') and item.channel not in ['videolibrary'] and item.action != 'season':
|
||||
from specials.autorenumber import select_type, renumber, check
|
||||
# support.dbg()
|
||||
if not check(item):
|
||||
select_type(item)
|
||||
return get_episodes(item)
|
||||
|
||||
+4
-7
@@ -29,18 +29,15 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "perfil",
|
||||
"id": "order",
|
||||
"type": "list",
|
||||
"label": "@60666",
|
||||
"label": "Ordinamento",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"@60667",
|
||||
"@60668",
|
||||
"@60669",
|
||||
"@60670",
|
||||
"@60671"
|
||||
"Default",
|
||||
"Alfabetico"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
+10
-15
@@ -435,9 +435,9 @@ def get_title(item):
|
||||
if item.quality:
|
||||
title += support.typo(item.quality, '_ [] color kod')
|
||||
|
||||
season_ = support.typo(config.get_localized_string(70736), '_ [] color white bold') if (type(item.args) != bool and 'season_completed' in item.news and not item.episode) else ''
|
||||
if season_:
|
||||
title += season_
|
||||
# season_ = support.typo(config.get_localized_string(70736), '_ [] color white bold') if (type(item.args) != bool and 'season_completed' in item.news and not item.episode) else ''
|
||||
# if season_:
|
||||
# title += season_
|
||||
return title
|
||||
|
||||
|
||||
@@ -453,8 +453,9 @@ def no_group(list_result_canal):
|
||||
# i.text_color = color3
|
||||
|
||||
itemlist.append(i.clone())
|
||||
|
||||
return sorted(itemlist, key=lambda it: it.title.lower())
|
||||
if config.get_setting('order','news') == 1:
|
||||
itemlist = sorted(itemlist, key=lambda it: it.title.lower())
|
||||
return itemlist
|
||||
|
||||
|
||||
def group_by_channel(list_result_canal):
|
||||
@@ -472,15 +473,10 @@ def group_by_channel(list_result_canal):
|
||||
|
||||
# We add the content found in the list_result list
|
||||
for c in sorted(dict_canales):
|
||||
itemlist.append(Item(channel="news", title=channels_id_name[c] + ':', text_color=color1, text_bold=True))
|
||||
channel_params = channeltools.get_channel_parameters(c)
|
||||
itemlist.append(Item(channel="news", title=support.typo(channel_params['title'],'bullet bold color kod'), thumbnail=channel_params['thumbnail']))
|
||||
|
||||
for i in dict_canales[c]:
|
||||
## if i.contentQuality:
|
||||
## i.title += ' (%s)' % i.contentQuality
|
||||
## if i.contentLanguage:
|
||||
## i.title += ' [%s]' % i.contentLanguage
|
||||
## i.title = ' %s' % i.title
|
||||
#### i.text_color = color3
|
||||
itemlist.append(i.clone())
|
||||
|
||||
return itemlist
|
||||
@@ -526,12 +522,10 @@ def group_by_content(list_result_canal):
|
||||
else:
|
||||
title += config.get_localized_string(70211) % (', '.join([i for i in canales_no_duplicados]))
|
||||
|
||||
new_item = v[0].clone(channel="news", title=title, action="show_channels",
|
||||
sub_list=[i.tourl() for i in v], extra=channels_id_name)
|
||||
new_item = v[0].clone(channel="news", title=title, action="show_channels", sub_list=[i.tourl() for i in v], extra=channels_id_name)
|
||||
else:
|
||||
new_item = v[0].clone(title=title)
|
||||
|
||||
## new_item.text_color = color3
|
||||
list_result.append(new_item)
|
||||
|
||||
return sorted(list_result, key=lambda it: it.title.lower())
|
||||
@@ -553,6 +547,7 @@ def show_channels(item):
|
||||
## new_item.title += ' [%s]' % new_item.language
|
||||
## new_item.title += ' (%s)' % channels_id_name[new_item.channel]
|
||||
new_item.text_color = color1
|
||||
new_item.title += typo(new_item.channel, '[]')
|
||||
|
||||
itemlist.append(new_item.clone())
|
||||
|
||||
|
||||
+32
-12
@@ -95,6 +95,10 @@ def saved_search(item):
|
||||
def new_search(item):
|
||||
logger.info()
|
||||
|
||||
temp_search_file = config.get_temp_file('temp-search')
|
||||
if filetools.isfile(temp_search_file):
|
||||
filetools.remove(temp_search_file)
|
||||
|
||||
itemlist = []
|
||||
if config.get_setting('last_search'):
|
||||
last_search = channeltools.get_channel_setting('Last_searched', 'search', '')
|
||||
@@ -149,11 +153,11 @@ def new_search(item):
|
||||
itemlist.append(new_item)
|
||||
|
||||
if item.mode == 'all' or not itemlist:
|
||||
itemlist = channel_search(Item(channel=item.channel,
|
||||
title=searched_text,
|
||||
text=searched_text,
|
||||
mode='all',
|
||||
infoLabels={}))
|
||||
return channel_search(Item(channel=item.channel,
|
||||
title=searched_text,
|
||||
text=searched_text,
|
||||
mode='all',
|
||||
infoLabels={}))
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -177,6 +181,18 @@ def channel_search(item):
|
||||
item.text = item.infoLabels['title']
|
||||
item.title = item.text
|
||||
|
||||
temp_search_file = config.get_temp_file('temp-search')
|
||||
if filetools.isfile(temp_search_file):
|
||||
itemlist = []
|
||||
f = filetools.read(temp_search_file)
|
||||
if f.startswith(item.text):
|
||||
for it in f.split(','):
|
||||
if it and it != item.text:
|
||||
itemlist.append(Item().fromurl(it))
|
||||
return itemlist
|
||||
else:
|
||||
filetools.remove(temp_search_file)
|
||||
|
||||
searched_id = item.infoLabels['tmdb_id']
|
||||
|
||||
channel_list, channel_titles = get_channels(item)
|
||||
@@ -185,8 +201,7 @@ def channel_search(item):
|
||||
searching_titles += channel_titles
|
||||
cnt = 0
|
||||
|
||||
progress = platformtools.dialog_progress(config.get_localized_string(30993) % item.title, config.get_localized_string(70744) % len(channel_list),
|
||||
', '.join(searching_titles))
|
||||
progress = platformtools.dialog_progress(config.get_localized_string(30993) % item.title, config.get_localized_string(70744) % len(channel_list), ', '.join(searching_titles))
|
||||
config.set_setting('tmdb_active', False)
|
||||
|
||||
search_action_list = []
|
||||
@@ -234,14 +249,12 @@ def channel_search(item):
|
||||
cnt += 1
|
||||
searching_titles.remove(searching_titles[searching.index(channel)])
|
||||
searching.remove(channel)
|
||||
progress.update(old_div(((total_search_actions - len(search_action_list)) * 100), total_search_actions), config.get_localized_string(70744) % str(len(channel_list) - cnt),
|
||||
', '.join(searching_titles))
|
||||
progress.update(old_div(((total_search_actions - len(search_action_list)) * 100), total_search_actions), config.get_localized_string(70744) % str(len(channel_list) - cnt), ', '.join(searching_titles))
|
||||
|
||||
progress.close()
|
||||
|
||||
cnt = 0
|
||||
progress = platformtools.dialog_progress(config.get_localized_string(30993) % item.title, config.get_localized_string(60295),
|
||||
config.get_localized_string(60293))
|
||||
progress = platformtools.dialog_progress(config.get_localized_string(30993) % item.title, config.get_localized_string(60295), config.get_localized_string(60293))
|
||||
|
||||
config.set_setting('tmdb_active', True)
|
||||
# res_count = 0
|
||||
@@ -330,7 +343,14 @@ def channel_search(item):
|
||||
if results:
|
||||
results.insert(0, Item(title=typo(config.get_localized_string(30025), 'color kod bold'), thumbnail=get_thumb('search.png')))
|
||||
# logger.debug(results_statistic)
|
||||
return valid + results
|
||||
|
||||
itlist = valid + results
|
||||
writelist = item.text
|
||||
for it in itlist:
|
||||
writelist += ',' + it.tourl()
|
||||
filetools.write(temp_search_file, writelist)
|
||||
|
||||
return itlist
|
||||
|
||||
|
||||
def get_channel_results(item, module_dict, search_action):
|
||||
|
||||
Reference in New Issue
Block a user