Autoplay: Nomi server corretti

This commit is contained in:
Alhaziel01
2020-06-19 16:36:54 +02:00
parent c06bbb9795
commit 68d79694a9
2 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -231,7 +231,7 @@ def sync_trakt_kodi(silent=True):
logger.info("Synchronization with Trakt started")
if notificacion:
platformtools.dialog_notification(config.get_localized_string(20000), config.get_localized_string(60045), time=2000)
platformtools.dialog_notification(config.get_localized_string(20000), config.get_localized_string(60045), sound=False, time=2000)
def mark_content_as_watched_on_kodi(item, value=1):
+9 -5
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from core import filetools
from core import filetools, jsontools
from core.item import Item
from platformcode import config, logger, platformtools
from time import sleep
@@ -215,8 +215,8 @@ def start(itemlist, item):
lang = " "
if hasattr(videoitem, 'language') and videoitem.language != "":
lang = " '%s' " % videoitem.language
platformtools.dialog_notification("AutoPlay %s" %text_b, "%s%s%s" % (videoitem.server.upper(), lang, videoitem.quality.upper()), sound=False)
name = servername(videoitem.server)
platformtools.dialog_notification("AutoPlay %s" %text_b, "%s%s%s" % (name, lang, videoitem.quality.upper()), sound=False)
# Try to play the links If the channel has its own play method, use it
try: channel = __import__('channels.%s' % channel_id, None, None, ["channels.%s" % channel_id])
@@ -254,13 +254,13 @@ def start(itemlist, item):
# If the maximum number of attempts of this server has been reached, ask if we want to continue testing or ignore it.
if max_intentos_servers[videoitem.server.lower()] == 0:
text = config.get_localized_string(60072) % videoitem.server.upper()
text = config.get_localized_string(60072) % name
if not platformtools.dialog_yesno("AutoPlay", text, config.get_localized_string(60073)):
max_intentos_servers[videoitem.server.lower()] = max_intentos
# If there are no items in the list, it is reported
if autoplay_elem == autoplay_list[-1]:
platformtools.dialog_notification('AutoPlay', config.get_localized_string(60072) % videoitem.server.upper())
platformtools.dialog_notification('AutoPlay', config.get_localized_string(60072) % name)
else:
platformtools.dialog_notification(config.get_localized_string(60074), config.get_localized_string(60075))
@@ -290,3 +290,7 @@ def play_multi_channel(item, itemlist):
start(videos, item)
else:
break
def servername(server):
path = filetools.join(config.get_runtime_path(), 'servers', server + '.json')
return jsontools.load(open(path, "r").read())['name'].upper()