Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1352,67 +1352,48 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
|
||||
|
||||
# Opciones disponibles para Reproducir torrents
|
||||
torrent_options = list()
|
||||
torrent_options.append([config.get_localized_string(30033)])
|
||||
torrent_options.append([config.get_localized_string(30033) + ' MCT'])
|
||||
|
||||
torrent_options.extend(torrent_client_installed(show_tuple=True))
|
||||
|
||||
torrent_options = torrent_client_installed(show_tuple=True)
|
||||
torrent_client = config.get_setting("torrent_client", server="torrent")
|
||||
|
||||
# Si es Libtorrent y no está soportado, se ofrecen alternativas, si las hay...
|
||||
if not LIBTORRENT and len(torrent_options) < 3:
|
||||
from specials import quasar_download
|
||||
if dialog_yesno(config.get_localized_string(70784), config.get_localized_string(70782)):
|
||||
quasar_download.download()
|
||||
|
||||
if torrent_client and torrent_client - 1 <= len(torrent_options):
|
||||
if torrent_client == 0:
|
||||
seleccion = dialog_select(config.get_localized_string(70193), [opcion[0] for opcion in torrent_options])
|
||||
else:
|
||||
seleccion = torrent_client - 1
|
||||
else:
|
||||
if len(torrent_options) > 1:
|
||||
seleccion = dialog_select(config.get_localized_string(70193), [opcion[0] for opcion in torrent_options])
|
||||
else:
|
||||
seleccion = 0
|
||||
|
||||
if seleccion < 2 and not LIBTORRENT:
|
||||
dialog_ok(config.get_localized_string(30033), config.get_localized_string(70774), \
|
||||
config.get_localized_string(70775) % config.get_setting("libtorrent_error", server="torrent", default=''), \
|
||||
config.get_localized_string(70776))
|
||||
if len(torrent_options) > 2:
|
||||
seleccion = dialog_select(config.get_localized_string(70193), [opcion[0] for opcion in torrent_options])
|
||||
if seleccion < 2:
|
||||
return
|
||||
if len(torrent_options) == 0:
|
||||
from specials import elementum_download
|
||||
if elementum_download.download():
|
||||
torrent_options = torrent_client_installed(show_tuple=True)
|
||||
else:
|
||||
return
|
||||
|
||||
if len(torrent_options) > 1:
|
||||
selection = dialog_select(config.get_localized_string(70193), [opcion[0] for opcion in torrent_options])
|
||||
else:
|
||||
selection = 0
|
||||
|
||||
# Si es Torrenter o Elementum con opción de Memoria, se ofrece la posibilidad ee usar Libtorrent temporalemente
|
||||
elif seleccion > 1 and LIBTORRENT and UNRAR and 'RAR-' in item.torrent_info and (
|
||||
"torrenter" in torrent_options[seleccion][0] \
|
||||
or ("elementum" in torrent_options[seleccion][0] and xbmcaddon.Addon(id="plugin.video.%s" % torrent_options[seleccion][0].replace('Plugin externo: ','')).getSetting('download_storage') == '1')):
|
||||
if dialog_yesno(torrent_options[seleccion][0], config.get_localized_string(70777), config.get_localized_string(70778), config.get_localized_string(70779) % size_rar):
|
||||
seleccion = 1
|
||||
if selection >= 0 and LIBTORRENT and UNRAR and 'RAR-' in item.torrent_info and (
|
||||
"torrenter" in torrent_options[selection][0] \
|
||||
or ("elementum" in torrent_options[selection][0] and xbmcaddon.Addon(id="plugin.video.%s" % torrent_options[selection][0].replace('Plugin externo: ','')).getSetting('download_storage') == '1')):
|
||||
if dialog_yesno(torrent_options[selection][0], config.get_localized_string(70777), config.get_localized_string(70778), config.get_localized_string(70779) % size_rar):
|
||||
selection = 1
|
||||
else:
|
||||
return
|
||||
# Si es Elementum pero con opción de Memoria, se muestras los Ajustes de Elementum y se pide al usuario que cambie a "Usar Archivos"
|
||||
elif seleccion > 1 and not LIBTORRENT and UNRAR and 'RAR-' in item.torrent_info and "elementum" in \
|
||||
torrent_options[seleccion][0] \
|
||||
and xbmcaddon.Addon(id="plugin.video.%s" % torrent_options[seleccion][0].replace('Plugin externo: ', '')) \
|
||||
elif selection >= 0 and not LIBTORRENT and UNRAR and 'RAR-' in item.torrent_info and "elementum" in \
|
||||
torrent_options[selection][0] \
|
||||
and xbmcaddon.Addon(id="plugin.video.%s" % torrent_options[selection][0].capitalize()) \
|
||||
.getSetting('download_storage') == '1':
|
||||
if dialog_yesno(torrent_options[seleccion][0], config.get_localized_string(70780) % size_rar, config.get_localized_string(70781)):
|
||||
if dialog_yesno(torrent_options[selection][0], config.get_localized_string(70780) % size_rar, config.get_localized_string(70781)):
|
||||
__settings__ = xbmcaddon.Addon(
|
||||
id="plugin.video.%s" % torrent_options[seleccion][0].replace('Plugin externo: ', ''))
|
||||
id="plugin.video.%s" % torrent_options[selection][0].capitalize())
|
||||
__settings__.openSettings() # Se visulizan los Ajustes de Elementum
|
||||
elementum_dl = xbmcaddon.Addon(
|
||||
id="plugin.video.%s" % torrent_options[seleccion][0].replace('Plugin externo: ', '')) \
|
||||
id="plugin.video.%s" % torrent_options[selection][0].capitalize()) \
|
||||
.getSetting('download_storage')
|
||||
if elementum_dl != '1':
|
||||
config.set_setting("elementum_dl", "1", server="torrent") # Salvamos el cambio para restaurarlo luego
|
||||
return # Se sale, porque habrá refresco y cancelaría Kodi si no
|
||||
|
||||
# Descarga de torrents a local
|
||||
if seleccion >= 0:
|
||||
if selection >= 0:
|
||||
|
||||
#### Compatibilidad con Kodi 18: evita cuelgues/cancelaciones cuando el .torrent se lanza desde pantalla convencional
|
||||
# if xbmc.getCondVisibility('Window.IsMedia'):
|
||||
@@ -1460,7 +1441,7 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
if url:
|
||||
url_stat = True
|
||||
item.url = url
|
||||
if "torrentin" in torrent_options[seleccion][0]:
|
||||
if "torrentin" in torrent_options[selection][0]:
|
||||
item.url = 'file://' + item.url
|
||||
|
||||
if not url and item.torrent_alt: # Si hay error, se busca un .torrent alternativo
|
||||
@@ -1480,85 +1461,73 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
item.url = filetools.join(config.get_videolibrary_path(), folder, item.url) # dirección del .torrent local en la Videoteca
|
||||
if filetools.copy(item.url, torrents_path, silent=True): # se copia a la carpeta generíca para evitar problemas de encode
|
||||
item.url = torrents_path
|
||||
if "torrentin" in torrent_options[seleccion][0]: # Si es Torrentin, hay que añadir un prefijo
|
||||
if "torrentin" in torrent_options[selection][0]: # Si es Torrentin, hay que añadir un prefijo
|
||||
item.url = 'file://' + item.url
|
||||
size, rar_files = generictools.get_torrent_size('', file_list=True, local_torr=torrents_path,short_pad=True)
|
||||
|
||||
mediaurl = item.url
|
||||
|
||||
if seleccion >= 0:
|
||||
if selection >= 0:
|
||||
|
||||
# Reproductor propio BT (libtorrent)
|
||||
if seleccion == 0:
|
||||
torrent.bt_client(mediaurl, xlistitem, rar_files, subtitle=item.subtitle, password=password, item=item)
|
||||
mediaurl = urllib.quote_plus(item.url)
|
||||
# Llamada con más parámetros para completar el título
|
||||
if ("quasar" in torrent_options[selection][1] or "elementum" in torrent_options[selection][1]) and item.infoLabels['tmdb_id']:
|
||||
if item.contentType == 'episode' and "elementum" not in torrent_options[selection][1]:
|
||||
mediaurl += "&episode=%s&library=&season=%s&show=%s&tmdb=%s&type=episode" % (
|
||||
item.infoLabels['episode'], item.infoLabels['season'], item.infoLabels['tmdb_id'],
|
||||
item.infoLabels['tmdb_id'])
|
||||
elif item.contentType == 'movie':
|
||||
mediaurl += "&library=&tmdb=%s&type=movie" % (item.infoLabels['tmdb_id'])
|
||||
|
||||
# Reproductor propio MCT (libtorrent)
|
||||
elif seleccion == 1:
|
||||
from platformcode import mct
|
||||
mct.play(mediaurl, xlistitem, subtitle=item.subtitle, password=password, item=item)
|
||||
xbmc.executebuiltin("PlayMedia(" + torrent_options[selection][1] % mediaurl + ")")
|
||||
|
||||
# Plugins externos
|
||||
else:
|
||||
mediaurl = urllib.quote_plus(item.url)
|
||||
# Llamada con más parámetros para completar el título
|
||||
if ("quasar" in torrent_options[seleccion][1] or "elementum" in torrent_options[seleccion][1]) and item.infoLabels['tmdb_id']:
|
||||
if item.contentType == 'episode' and "elementum" not in torrent_options[seleccion][1]:
|
||||
mediaurl += "&episode=%s&library=&season=%s&show=%s&tmdb=%s&type=episode" % (
|
||||
item.infoLabels['episode'], item.infoLabels['season'], item.infoLabels['tmdb_id'],
|
||||
item.infoLabels['tmdb_id'])
|
||||
elif item.contentType == 'movie':
|
||||
mediaurl += "&library=&tmdb=%s&type=movie" % (item.infoLabels['tmdb_id'])
|
||||
# Si es un archivo RAR, monitorizamos el cliente Torrent hasta que haya descargado el archivo,
|
||||
# y después lo extraemos, incluso con RAR's anidados y con contraseña
|
||||
torr_client = torrent_options[selection][0].capitalize()
|
||||
if 'RAR-' in size and torr_client in ['quasar', 'elementum'] and UNRAR:
|
||||
rar_file, save_path_videos, folder_torr = torrent.wait_for_download(item, mediaurl, rar_files, torr_client) # Esperamos mientras se descarga el RAR
|
||||
if rar_file and save_path_videos: # Si se ha descargado el RAR...
|
||||
dp = dialog_progress_bg('KoD %s' % torr_client)
|
||||
video_file, rar, video_path, erase_file_path = torrent.extract_files(rar_file, save_path_videos, password, dp, item, torr_client) # ... extraemos el vídeo del RAR
|
||||
dp.close()
|
||||
|
||||
xbmc.executebuiltin("PlayMedia(" + torrent_options[seleccion][1] % mediaurl + ")")
|
||||
# Reproducimos el vídeo extraido, si no hay nada en reproducción
|
||||
while is_playing() and rar and not xbmc.abortRequested:
|
||||
time.sleep(3) # Repetimos cada intervalo
|
||||
if rar and not xbmc.abortRequested:
|
||||
time.sleep(1)
|
||||
video_play = filetools.join(video_path, video_file)
|
||||
log("##### video_play: %s" % video_play)
|
||||
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
|
||||
playlist.clear()
|
||||
playlist.add(video_play, xlistitem)
|
||||
xbmc_player.play(playlist)
|
||||
|
||||
# Si es un archivo RAR, monitorizamos el cliente Torrent hasta que haya descargado el archivo,
|
||||
# y después lo extraemos, incluso con RAR's anidados y con contraseña
|
||||
torr_client = torrent_options[seleccion][0].replace('Plugin externo: ', '')
|
||||
if 'RAR-' in size and torr_client in ['quasar', 'elementum'] and UNRAR:
|
||||
rar_file, save_path_videos, folder_torr = torrent.wait_for_download(item, mediaurl, rar_files, torr_client) # Esperamos mientras se descarga el RAR
|
||||
if rar_file and save_path_videos: # Si se ha descargado el RAR...
|
||||
dp = dialog_progress_bg('KoD %s' % torr_client)
|
||||
video_file, rar, video_path, erase_file_path = torrent.extract_files(rar_file, save_path_videos, password, dp, item, torr_client) # ... extraemos el vídeo del RAR
|
||||
dp.close()
|
||||
# selectionamos que clientes torrent soportamos para el marcado de vídeos vistos: asumimos que todos funcionan
|
||||
torrent.mark_auto_as_watched(item)
|
||||
|
||||
# Reproducimos el vídeo extraido, si no hay nada en reproducción
|
||||
while is_playing() and rar and not xbmc.abortRequested:
|
||||
time.sleep(3) # Repetimos cada intervalo
|
||||
if rar and not xbmc.abortRequested:
|
||||
time.sleep(1)
|
||||
video_play = filetools.join(video_path, video_file)
|
||||
log("##### video_play: %s" % video_play)
|
||||
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
|
||||
playlist.clear()
|
||||
playlist.add(video_play, xlistitem)
|
||||
xbmc_player.play(playlist)
|
||||
|
||||
if seleccion > 1:
|
||||
# Seleccionamos que clientes torrent soportamos para el marcado de vídeos vistos: asumimos que todos funcionan
|
||||
torrent.mark_auto_as_watched(item)
|
||||
|
||||
# Si se ha extraido un RAR, se pregunta para borrar los archivos después de reproducir el vídeo (plugins externos)
|
||||
while is_playing() and rar and not xbmc.abortRequested:
|
||||
time.sleep(3) # Repetimos cada intervalo
|
||||
if rar and not xbmc.abortRequested:
|
||||
if dialog_yesno('KoD %s' % torr_client, config.get_localized_string(30031)):
|
||||
log("##### erase_file_path: %s" % erase_file_path)
|
||||
try:
|
||||
torr_data, deamon_url, index = torrent.get_tclient_data(folder_torr, torr_client)
|
||||
if torr_data and deamon_url:
|
||||
data = httptools.downloadpage('%sdelete/%s' % (deamon_url, index), timeout=5, alfa_s=True).data
|
||||
time.sleep(1)
|
||||
if filetools.isdir(erase_file_path):
|
||||
filetools.rmdirtree(erase_file_path)
|
||||
elif filetools.exists(erase_file_path) and filetools.isfile(erase_file_path):
|
||||
filetools.remove(erase_file_path)
|
||||
except:
|
||||
logger.error(traceback.format_exc(1))
|
||||
elementum_dl = config.get_setting("elementum_dl", server="torrent", default='') # Si salvamos el cambio de Elementum
|
||||
if elementum_dl:
|
||||
config.set_setting("elementum_dl", "", server="torrent") # lo reseteamos en Alfa
|
||||
xbmcaddon.Addon(id="plugin.video.%s" % torrent_options[seleccion][0].replace('Plugin externo: ', '')) \
|
||||
.setSetting('download_storage', elementum_dl) # y lo reseteamos en Elementum
|
||||
# Si se ha extraido un RAR, se pregunta para borrar los archivos después de reproducir el vídeo (plugins externos)
|
||||
while is_playing() and rar and not xbmc.abortRequested:
|
||||
time.sleep(3) # Repetimos cada intervalo
|
||||
if rar and not xbmc.abortRequested:
|
||||
if dialog_yesno('KoD %s' % torr_client, config.get_localized_string(30031)):
|
||||
log("##### erase_file_path: %s" % erase_file_path)
|
||||
try:
|
||||
torr_data, deamon_url, index = torrent.get_tclient_data(folder_torr, torr_client)
|
||||
if torr_data and deamon_url:
|
||||
data = httptools.downloadpage('%sdelete/%s' % (deamon_url, index), timeout=5, alfa_s=True).data
|
||||
time.sleep(1)
|
||||
if filetools.isdir(erase_file_path):
|
||||
filetools.rmdirtree(erase_file_path)
|
||||
elif filetools.exists(erase_file_path) and filetools.isfile(erase_file_path):
|
||||
filetools.remove(erase_file_path)
|
||||
except:
|
||||
logger.error(traceback.format_exc(1))
|
||||
elementum_dl = config.get_setting("elementum_dl", server="torrent", default='') # Si salvamos el cambio de Elementum
|
||||
if elementum_dl:
|
||||
config.set_setting("elementum_dl", "", server="torrent") # lo reseteamos en Alfa
|
||||
xbmcaddon.Addon(id="plugin.video.%s" % torrent_options[selection][0].replace('Plugin externo: ', '')) \
|
||||
.setSetting('download_storage', elementum_dl) # y lo reseteamos en Elementum
|
||||
|
||||
|
||||
def log(texto):
|
||||
|
||||
@@ -5896,19 +5896,19 @@ msgid "Do you want to call Elementum Settings to temporarily switch to Use Files
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#70782"
|
||||
msgid "Your device is not compatible with the Internal Client, do you want to use Quasar for Torrents?"
|
||||
msgid "You must install an external Client to take advantage of the torrent support. Do you want to install Elementum?"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#70783"
|
||||
msgid "Quasar installed and configured, enjoy!"
|
||||
msgid "Elementum is installed on your device, but is not active. Do you want to activate it?"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#70784"
|
||||
msgid "Attention!!"
|
||||
msgid "Attention!"
|
||||
msgstr "Attenzione!"
|
||||
|
||||
msgctxt "#70785"
|
||||
msgid "Install Quasar"
|
||||
msgid "Install Elementum"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#70786"
|
||||
|
||||
@@ -5896,20 +5896,20 @@ msgid "Do you want to call Elementum Settings to temporarily switch to Use Files
|
||||
msgstr "Vuoi aprire i settaggi di Elementum per passare temporaneamente a usare i file?"
|
||||
|
||||
msgctxt "#70782"
|
||||
msgid "Your device is not compatible with the Internal Client, do you want to use Quasar for Torrents?"
|
||||
msgstr "Il tuo dispositivo non è compatibile con il Client Interno, Vuoi usare Quasar per i Torrent?"
|
||||
msgid "You must install an external Client to take advantage of the torrent support. Do you want to install Elementum?"
|
||||
msgstr "Per poter usufruire del support torrent devi installare un Client esterno. Vuoi installare Elementum?"
|
||||
|
||||
msgctxt "#70783"
|
||||
msgid "Quasar installed and configured, enjoy!"
|
||||
msgstr "Quasar installato e configurato, buona Visione!"
|
||||
msgid "Elementum is installed on your device, but is not active. Do you want to activate it?"
|
||||
msgstr "Elementum è installato sul tuo dispositivo, ma non è attivo. Vuoi Attivarlo?"
|
||||
|
||||
msgctxt "#70784"
|
||||
msgid "Attention!"
|
||||
msgstr "Attenzione!"
|
||||
|
||||
msgctxt "#70785"
|
||||
msgid "Install Quasar"
|
||||
msgstr "Installa Quasar"
|
||||
msgid "Install Elementum"
|
||||
msgstr "Installa Elementum"
|
||||
|
||||
msgctxt "#70786"
|
||||
msgid "Autostart"
|
||||
|
||||
5
resources/settings/elementum/settings.xml
Normal file
5
resources/settings/elementum/settings.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<settings version="2">
|
||||
<setting id="skip_burst_search" default="true">true</setting>
|
||||
<setting id="greeting_enabled">false</setting>
|
||||
<setting id="do_not_disturb" default="true">true</setting>
|
||||
</settings>
|
||||
@@ -1,51 +1,78 @@
|
||||
|
||||
from core import filetools, downloadtools, support
|
||||
from platformcode import config, platformtools, updater
|
||||
from time import sleep
|
||||
|
||||
import xbmc, xbmcaddon, os, sys, platform
|
||||
import xbmc, xbmcaddon, sys, platform
|
||||
|
||||
host = 'https://github.com'
|
||||
quasar_url = host + '/scakemyer/plugin.video.quasar/releases'
|
||||
filename = filetools.join(config.get_data_path(),'quasar.zip')
|
||||
addon_path = xbmc.translatePath("special://home/addons/")
|
||||
quasar_path = filetools.join(addon_path,'plugin.video.quasar')
|
||||
elementum_url = host + '/elgatito/plugin.video.elementum/releases'
|
||||
filename = filetools.join(config.get_data_path(),'elementum.zip')
|
||||
addon_path = xbmc.translatePath('special://home/addons/')
|
||||
setting_path = xbmc.translatePath('special://profile/addon_data/')
|
||||
elementum_path = filetools.join(addon_path,'plugin.video.elementum')
|
||||
elementum_setting = filetools.join(setting_path,'plugin.video.elementum')
|
||||
elementum_setting_file = filetools.join(elementum_setting,'settings.xml')
|
||||
kod_setting_file = filetools.join(addon_path,'plugin.video.kod', 'resources', 'settings', 'elementum', 'settings.xml')
|
||||
|
||||
|
||||
def download(item=None):
|
||||
if filetools.exists(quasar_path):
|
||||
xbmc.executeJSONRPC('{"jsonrpc": "2.0", "id":1, "method": "Addons.SetAddonEnabled", "params": { "addonid": "plugin.video.quasar", "enabled": false }}')
|
||||
sleep(1)
|
||||
filetools.rmdirtree(quasar_path)
|
||||
|
||||
if filetools.exists(filename):
|
||||
filetools.remove(filename)
|
||||
return download()
|
||||
if filetools.exists(elementum_path):
|
||||
if platformtools.dialog_yesno(config.get_localized_string(70784), config.get_localized_string(70783)):
|
||||
setting()
|
||||
return True
|
||||
|
||||
else:
|
||||
platform = get_platform()
|
||||
support.log('OS:', platform)
|
||||
support.log('Extract IN:', quasar_path)
|
||||
url = support.match(quasar_url, patronBlock=r'<div class="release-entry">(.*?)<!-- /.release-body -->', patron=r'<a href="([a-zA-Z0-9/\.-]+%s.zip)' % platform).match
|
||||
support.log('URL:', url)
|
||||
if url:
|
||||
downloadtools.downloadfile(host + url, filename)
|
||||
extract()
|
||||
if platformtools.dialog_yesno(config.get_localized_string(70784), config.get_localized_string(70782)):
|
||||
pform = get_platform()
|
||||
url = support.match(elementum_url, patronBlock=r'<div class="release-entry">(.*?)<!-- /.release-body -->', patron=r'<a href="([a-zA-Z0-9/\.-]+%s.zip)' % pform).match
|
||||
support.log('OS:', pform)
|
||||
support.log('Extract IN:', elementum_path)
|
||||
support.log('URL:', url)
|
||||
if url:
|
||||
downloadtools.downloadfile(host + url, filename)
|
||||
extract()
|
||||
xbmc.sleep(1000)
|
||||
setting()
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def extract():
|
||||
import zipfile
|
||||
support.log('Estraggo Quasar in:', quasar_path)
|
||||
support.log('Estraggo Elementum in:', elementum_path)
|
||||
with zipfile.ZipFile(filename, 'r') as zip_ref:
|
||||
zip_ref.extractall(xbmc.translatePath("special://home/addons/"))
|
||||
zip_ref.extractall(xbmc.translatePath(addon_path))
|
||||
|
||||
|
||||
def setting():
|
||||
# support.dbg()
|
||||
xbmc.executebuiltin('UpdateLocalAddons')
|
||||
if platformtools.dialog_ok('Quasar', config.get_localized_string(70783)):
|
||||
if filetools.exists(filename):
|
||||
filetools.remove(filename)
|
||||
xbmc.executeJSONRPC('{"jsonrpc": "2.0", "id":1, "method": "Addons.SetAddonEnabled", "params": { "addonid": "plugin.video.quasar", "enabled": true }}')
|
||||
updater.refreshLang()
|
||||
xbmcaddon.Addon(id="plugin.video.quasar").setSetting('download_path', config.get_setting('downloadpath'))
|
||||
xbmc.executebuiltin('UpdateLocalAddons')
|
||||
sleep(2)
|
||||
|
||||
if filetools.isfile(elementum_setting_file):
|
||||
xbmc.executeJSONRPC('{"jsonrpc": "2.0", "id":1, "method": "Addons.SetAddonEnabled", "params": { "addonid": "plugin.video.elementum", "enabled": true }}')
|
||||
Continue = True
|
||||
while Continue: #xbmc.sleep(1000)
|
||||
try:
|
||||
__settings__ = xbmcaddon.Addon(id="plugin.video.elementum")
|
||||
__settings__.setSetting('skip_burst_search', 'true')
|
||||
__settings__.setSetting('greeting_enabled', 'false')
|
||||
__settings__.setSetting('do_not_disturb', 'true')
|
||||
Continue = False
|
||||
except:
|
||||
Continue = True
|
||||
else:
|
||||
if not filetools.exists(elementum_path):
|
||||
filetools.mkdir(elementum_path)
|
||||
filetools.copy(kod_setting_file, elementum_setting_file)
|
||||
xbmc.sleep(1000)
|
||||
xbmc.executeJSONRPC('{"jsonrpc": "2.0", "id":1, "method": "Addons.SetAddonEnabled", "params": { "addonid": "plugin.video.elementum", "enabled": true }}')
|
||||
updater.refreshLang()
|
||||
|
||||
if filetools.exists(filename):
|
||||
filetools.remove(filename)
|
||||
if platformtools.dialog_ok('Elementum', config.get_localized_string(70783)):
|
||||
return
|
||||
|
||||
|
||||
def get_platform():
|
||||
@@ -64,8 +91,7 @@ def get_platform():
|
||||
if "arm" in platform.machine() or "aarch" in platform.machine():
|
||||
ret["arch"] = "arm"
|
||||
if "64" in platform.machine() and ret["auto_arch"] == "64-bit":
|
||||
ret["arch"] = "arm"
|
||||
#ret["arch"] = "x64" #The binary is corrupted in install package
|
||||
ret["arch"] = "arm64"
|
||||
elif xbmc.getCondVisibility("system.platform.linux"):
|
||||
ret["os"] = "linux"
|
||||
if "aarch" in platform.machine() or "arm64" in platform.machine():
|
||||
Reference in New Issue
Block a user