Version 0.4.3

This commit is contained in:
Paco8 committed 2023-01-28 15:21:51 +01:00
1 parent f2b98d02a2
commit fc3741a158
6 files changed
+33 -2

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.movistarplus"
name="Movistar+"
version="0.4.1"
version="0.4.3"
provider-name="Paco8">
<requires>
<!--- <import addon="xbmc.python" version="2.25.0"/> -->
@@ -28,7 +28,7 @@
<source></source>
<assets>
<icon>icon.png</icon>
<fanart></fanart>
<fanart>resources/fanart.png</fanart>
<screenshot>resources/screen1.jpg</screenshot>
<screenshot>resources/screen2.jpg</screenshot>
<screenshot>resources/screen3.jpg</screenshot>
Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

@@ -245,6 +245,14 @@ msgctxt "#30183"
msgid "Login with username"
msgstr ""
msgctxt "#30184"
msgid "Export access token to key file"
msgstr ""
msgctxt "#30185"
msgid "Select a folder to save the key file"
msgstr ""
msgctxt "#30200"
msgid "Error"
msgstr ""
@@ -245,6 +245,14 @@ msgctxt "#30183"
msgid "Login with username"
msgstr "Iniciar sesión con nombre y clave"
msgctxt "#30184"
msgid "Export access token to key file"
msgstr "Exportar token de acceso a fichero key"
msgctxt "#30185"
msgid "Select a folder to save the key file"
msgstr "Seleccion una carpeta donde guardar el fichero key"
msgctxt "#30200"
msgid "Error"
msgstr "Error"
+6
View File
@@ -748,6 +748,12 @@ class Movistar(object):
filename = bytes(filename, 'utf-8')
shutil.copyfile(filename, self.cache.config_directory + 'auth.key')
def export_key_file(self, filename):
import shutil
if sys.version_info[0] > 2:
filename = bytes(filename, 'utf-8')
shutil.copyfile(self.cache.config_directory + 'auth.key', filename)
def load_key_file(self):
content = self.cache.load_file('auth.key')
if content:
+9
View File
@@ -404,10 +404,17 @@ def login_with_key():
m.install_key_file(filename)
clear_session()
def export_key():
directory = xbmcgui.Dialog().browseSingle(0, addon.getLocalizedString(30185), '')
if directory:
m.export_key_file(directory + 'movistarplus.key')
def list_users():
open_folder(addon.getLocalizedString(30160)) # Change user
add_menu_option(addon.getLocalizedString(30183), get_url(action='login')) # Login with username
add_menu_option(addon.getLocalizedString(30181), get_url(action='login_with_key')) # Login with key
if os.path.exists(profile_dir + 'auth.key'):
add_menu_option(addon.getLocalizedString(30184), get_url(action='export_key')) # Export key
add_menu_option(addon.getLocalizedString(30150), get_url(action='logout')) # Close session
close_folder()
@@ -438,6 +445,8 @@ def router(paramstring):
login_with_key()
elif params['action'] == 'login':
login()
elif params['action'] == 'export_key':
export_key()
elif params['action'] == 'user':
list_users()
elif params['action'] == 'logout':