diff --git a/plugin.video.alfa/platformcode/platformtools.py b/plugin.video.alfa/platformcode/platformtools.py index 7c934e31..88866089 100644 --- a/plugin.video.alfa/platformcode/platformtools.py +++ b/plugin.video.alfa/platformcode/platformtools.py @@ -372,6 +372,44 @@ def set_context_commands(item, parent_item): else: context = [] + if config.get_setting("faster_item_serialization"): + # logger.info("Reducing serialization!") + itemBK = item + item = Item() + item.action = itemBK.action + item.channel = itemBK.channel + infoLabels = {} + if itemBK.infoLabels["year"]: infoLabels["year"] = itemBK.infoLabels["year"] + if itemBK.infoLabels["imdb_id"]: infoLabels["imdb_id"] = itemBK.infoLabels["imdb_id"] + if itemBK.infoLabels["tmdb_id"]: infoLabels["tmdb_id"] = itemBK.infoLabels["tmdb_id"] + if itemBK.infoLabels["tvdb_id"]: infoLabels["tvdb_id"] = itemBK.infoLabels["tvdb_id"] + if itemBK.infoLabels["noscrap_id"]: infoLabels["noscrap_id"] = itemBK.infoLabels["noscrap_id"] + if len(infoLabels) > 0: item.infoLabels = infoLabels + + if itemBK.thumbnail: item.thumbnail = itemBK.thumbnail + if itemBK.extra: item.extra = itemBK.extra + if itemBK.contentEpisodeNumber: item.contentEpisodeNumber = itemBK.contentEpisodeNumber + if itemBK.contentEpisodeTitle: item.contentEpisodeTitle = itemBK.contentEpisodeTitle + if itemBK.contentPlot: item.contentPlot = itemBK.contentPlot + if itemBK.contentQuality: item.contentQuality = itemBK.contentQuality + if itemBK.contentSeason: item.contentSeason = itemBK.contentSeason + if itemBK.contentSerieName: item.contentSerieName = itemBK.contentSerieName + if itemBK.contentThumbnail: item.contentThumbnail = itemBK.contentThumbnail + if itemBK.contentTitle: item.contentTitle = itemBK.contentTitle + if itemBK.contentType: item.contentType = itemBK.contentType + if itemBK.duration: item.duration = itemBK.duration + if itemBK.fulltitle: item.fulltitle = itemBK.fulltitle + if itemBK.plot: item.plot = itemBK.plot + if itemBK.quality: item.quality = itemBK.quality + if itemBK.show: item.show = itemBK.show + if itemBK.title: item.title = itemBK.title + if itemBK.viewcontent: item.viewcontent = itemBK.viewcontent + + # itemJson = item.tojson() + # logger.info("Elemento: {0} bytes".format(len(itemJson))) + # logger.info(itemJson) + # logger.info("--------------------------------------------------------------") + # Opciones segun item.context for command in context: # Predefinidos @@ -507,14 +545,14 @@ def set_context_commands(item, parent_item): from_action=item.action).tourl()))) # Descargar episodio - if item.contentType == "episode": + elif item.contentType == "episode": context_commands.append(("Descargar Episodio", "XBMC.RunPlugin(%s?%s)" % (sys.argv[0], item.clone(channel="downloads", action="save_download", from_channel=item.channel, from_action=item.action).tourl()))) # Descargar temporada - if item.contentType == "season": + elif item.contentType == "season": context_commands.append(("Descargar Temporada", "XBMC.RunPlugin(%s?%s)" % (sys.argv[0], item.clone(channel="downloads", action="save_download", from_channel=item.channel, diff --git a/plugin.video.alfa/resources/language/Spanish/strings.po b/plugin.video.alfa/resources/language/Spanish/strings.po index bc41ec1b..38cecf4d 100644 --- a/plugin.video.alfa/resources/language/Spanish/strings.po +++ b/plugin.video.alfa/resources/language/Spanish/strings.po @@ -251,6 +251,10 @@ msgctxt "#30164" msgid "Delete this file" msgstr "Borrar este fichero" +msgctxt "#30300" +msgid "Faster context menus" +msgstr "Menús contextuales rápidos (puede causar que algunas opciones no funcionen)" + msgctxt "#30501" msgid "Paths" msgstr "Rutas" diff --git a/plugin.video.alfa/resources/settings.xml b/plugin.video.alfa/resources/settings.xml index 950bf63b..719cd5e6 100644 --- a/plugin.video.alfa/resources/settings.xml +++ b/plugin.video.alfa/resources/settings.xml @@ -7,6 +7,7 @@ +