Piccoli Fix

This commit is contained in:
Alhaziel01
2021-06-08 20:11:56 +02:00
parent 34c438d01b
commit eb0aa3cafe
3 changed files with 12 additions and 10 deletions
+6
View File
@@ -213,6 +213,9 @@ def run(item=None):
# Special action for findvideos, where the plugin looks for known urls
elif item.action == "findvideos":
from core import servertools
if item.window and item.channel != 'videolibrary':
p_dialog = platformtools.dialog_progress_bg(config.get_localized_string(20000), config.get_localized_string(60683))
p_dialog.update(0)
# First checks if channel has a "findvideos" function
if hasattr(channel, 'findvideos'):
@@ -227,6 +230,9 @@ def run(item=None):
itemlist = limit_itemlist(itemlist)
if item.window:
if item.channel != 'videolibrary':
p_dialog.update(100)
p_dialog.close()
platformtools.serverwindow(item, itemlist)
else:
platformtools.render_items(itemlist, item)
+2 -2
View File
@@ -363,7 +363,7 @@ def render_items(itemlist, parent_item):
title = item.title
episode = ''
if parent_item.channel not in ['videolibrary']:
if parent_item.channel not in ['videolibrary'] and title[:1] not in ['[', '']:
if type(item.contentSeason) == int and type(item.contentEpisodeNumber) == int and not parent_item.onlyep:
episode = '{}x{:02d}'.format(item.contentSeason, item.contentEpisodeNumber)
elif type(item.contentEpisodeNumber) == int:
@@ -374,7 +374,7 @@ def render_items(itemlist, parent_item):
if episode: title = '{}. {}'.format(episode, title)
if item.title2: title = '{} - {}'.format(title, item.title2)
if not config.get_setting('format_title') and title[:1] not in ['[', '']:
if not config.get_setting('format_title'):
server = typo(item.server, '_ []') if item.server else ''
quality = typo(item.quality, '_ [] color kod') if item.quality else ''
lang = typo(item.contentLanguage, '_ [] color kod') if item.contentLanguage else ''
+4 -8
View File
@@ -311,7 +311,7 @@ def findvideos(item):
videolibrarytools.check_renumber_options(item)
itemlist = []
if item.window:
p_dialog = platformtools.dialog_progress_bg(config.get_localized_string(50003))
p_dialog = platformtools.dialog_progress_bg(config.get_localized_string(20000), config.get_localized_string(60683))
p_dialog.update(0)
@@ -337,7 +337,7 @@ def findvideos(item):
videolibrarydb.close()
if item.window:
p_dialog.update(40)
p_dialog.update(50)
if videolibrary_items.get('local'):
try:
@@ -374,8 +374,7 @@ def findvideos(item):
pl = [s for s in itemlist if s.contentLanguage in [prefered_lang, '']]
if pl: itemlist = pl
if item.window:
p_dialog.update(80)
p_dialog.update(100)
if len(itlist) > 1:
for it in itemlist:
@@ -391,7 +390,7 @@ def findvideos(item):
itemlist = servertools.check_list_links(itemlist, config.get_setting('checklinks_number'))
if item.window:
p_dialog.update(100)
p_dialog.close()
platformtools.serverwindow(item, itemlist)
else:
@@ -951,16 +950,13 @@ def add_download_items(item, itemlist):
if item.action == 'findvideos':
if item.contentType != 'movie':
downloadItem.title = '{} {}'.format(typo(config.get_localized_string(60356), 'color kod bold'), item.title)
downloadItem.contentTitle = '{} {}'.format(config.get_localized_string(60356), item.title)
else: # film
downloadItem.title = typo(config.get_localized_string(60354), 'color kod bold')
downloadItem.title = config.get_localized_string(60354)
downloadItem.downloadItemlist = [i.tourl() for i in itemlist]
itemlist.append(downloadItem)
else:
if item.contentSeason: # season
downloadItem.title = typo(config.get_localized_string(60357), 'color kod bold')
downloadItem.title = config.get_localized_string(60357)
itemlist.append(downloadItem)
else: # tvshow + not seen
itemlist.append(downloadItem)