Piccoli fix e ottimizzazioni
This commit is contained in:
@@ -127,12 +127,13 @@ class Main(xbmcgui.WindowXMLDialog):
|
|||||||
|
|
||||||
|
|
||||||
def onAction(self, action):
|
def onAction(self, action):
|
||||||
|
action = action.getId()
|
||||||
# exit
|
# exit
|
||||||
if action.getId() in [xbmcgui.ACTION_PREVIOUS_MENU, xbmcgui.ACTION_NAV_BACK]:
|
if action in [xbmcgui.ACTION_PREVIOUS_MENU, xbmcgui.ACTION_NAV_BACK]:
|
||||||
self.close()
|
self.close()
|
||||||
if submenu: open_shortcut_menu(self=True)
|
if submenu: open_shortcut_menu(self=True)
|
||||||
|
|
||||||
if action.getId() == xbmcgui.ACTION_CONTEXT_MENU:
|
if action == xbmcgui.ACTION_CONTEXT_MENU:
|
||||||
config.open_settings()
|
config.open_settings()
|
||||||
|
|
||||||
focus = self.getFocusId()
|
focus = self.getFocusId()
|
||||||
|
|||||||
@@ -64,15 +64,17 @@ def list_tvshows(item):
|
|||||||
logger.debug()
|
logger.debug()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
lista = []
|
lista = []
|
||||||
tvshows_path = []
|
# tvshows_path = []
|
||||||
|
|
||||||
# We get all the tvshow.nfo from the SERIES video library recursively
|
# # We get all the tvshow.nfo from the SERIES video library recursively
|
||||||
for root, folders, files in filetools.walk(videolibrarytools.TVSHOWS_PATH):
|
# for root, folders, files in filetools.walk(videolibrarytools.TVSHOWS_PATH):
|
||||||
for f in folders:
|
# for f in folders:
|
||||||
tvshows_path += [filetools.join(root, f, "tvshow.nfo")]
|
# tvshows_path += [filetools.join(root, f, "tvshow.nfo")]
|
||||||
|
|
||||||
|
root = videolibrarytools.TVSHOWS_PATH
|
||||||
with futures.ThreadPoolExecutor() as executor:
|
with futures.ThreadPoolExecutor() as executor:
|
||||||
for tvshow_path in tvshows_path:
|
for folder in filetools.listdir(root):
|
||||||
|
tvshow_path = filetools.join(root, folder, "tvshow.nfo")
|
||||||
item_tvshow, value = executor.submit(get_results, tvshow_path, root, 'tvshow').result()
|
item_tvshow, value = executor.submit(get_results, tvshow_path, root, 'tvshow').result()
|
||||||
# verify the existence of the channels
|
# verify the existence of the channels
|
||||||
if item_tvshow.library_urls and len(item_tvshow.library_urls) > 0:
|
if item_tvshow.library_urls and len(item_tvshow.library_urls) > 0:
|
||||||
@@ -1130,8 +1132,8 @@ def add_download_items(item, itemlist):
|
|||||||
thumbnail=thumb('downloads'),
|
thumbnail=thumb('downloads'),
|
||||||
parent=item.tourl())
|
parent=item.tourl())
|
||||||
if item.action == 'findvideos':
|
if item.action == 'findvideos':
|
||||||
if item.contentType == 'episode':
|
if item.contentType != 'movie':
|
||||||
downloadItem.title = typo(config.get_localized_string(60356), "color kod bold")
|
downloadItem.title = '{} {}'.format(typo(config.get_localized_string(60356), "color kod bold"), item.title)
|
||||||
else: # film
|
else: # film
|
||||||
downloadItem.title = typo(config.get_localized_string(60354), "color kod bold")
|
downloadItem.title = typo(config.get_localized_string(60354), "color kod bold")
|
||||||
downloadItem.downloadItemlist = [i.tourl() for i in itemlist]
|
downloadItem.downloadItemlist = [i.tourl() for i in itemlist]
|
||||||
|
|||||||
Reference in New Issue
Block a user