Version 0.4.3
This commit is contained in:
1 parent
f2b98d02a2
commit
fc3741a158
6 files changed
+33
-2
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<addon id="plugin.video.movistarplus"
|
<addon id="plugin.video.movistarplus"
|
||||||
name="Movistar+"
|
name="Movistar+"
|
||||||
version="0.4.1"
|
version="0.4.3"
|
||||||
provider-name="Paco8">
|
provider-name="Paco8">
|
||||||
<requires>
|
<requires>
|
||||||
<!--- <import addon="xbmc.python" version="2.25.0"/> -->
|
<!--- <import addon="xbmc.python" version="2.25.0"/> -->
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<source></source>
|
<source></source>
|
||||||
<assets>
|
<assets>
|
||||||
<icon>icon.png</icon>
|
<icon>icon.png</icon>
|
||||||
<fanart></fanart>
|
<fanart>resources/fanart.png</fanart>
|
||||||
<screenshot>resources/screen1.jpg</screenshot>
|
<screenshot>resources/screen1.jpg</screenshot>
|
||||||
<screenshot>resources/screen2.jpg</screenshot>
|
<screenshot>resources/screen2.jpg</screenshot>
|
||||||
<screenshot>resources/screen3.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"
|
msgid "Login with username"
|
||||||
msgstr ""
|
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"
|
msgctxt "#30200"
|
||||||
msgid "Error"
|
msgid "Error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
@@ -245,6 +245,14 @@ msgctxt "#30183"
|
|||||||
msgid "Login with username"
|
msgid "Login with username"
|
||||||
msgstr "Iniciar sesión con nombre y clave"
|
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"
|
msgctxt "#30200"
|
||||||
msgid "Error"
|
msgid "Error"
|
||||||
msgstr "Error"
|
msgstr "Error"
|
||||||
|
|||||||
@@ -748,6 +748,12 @@ class Movistar(object):
|
|||||||
filename = bytes(filename, 'utf-8')
|
filename = bytes(filename, 'utf-8')
|
||||||
shutil.copyfile(filename, self.cache.config_directory + 'auth.key')
|
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):
|
def load_key_file(self):
|
||||||
content = self.cache.load_file('auth.key')
|
content = self.cache.load_file('auth.key')
|
||||||
if content:
|
if content:
|
||||||
|
|||||||
@@ -404,10 +404,17 @@ def login_with_key():
|
|||||||
m.install_key_file(filename)
|
m.install_key_file(filename)
|
||||||
clear_session()
|
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():
|
def list_users():
|
||||||
open_folder(addon.getLocalizedString(30160)) # Change user
|
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(30183), get_url(action='login')) # Login with username
|
||||||
add_menu_option(addon.getLocalizedString(30181), get_url(action='login_with_key')) # Login with key
|
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
|
add_menu_option(addon.getLocalizedString(30150), get_url(action='logout')) # Close session
|
||||||
close_folder()
|
close_folder()
|
||||||
|
|
||||||
@@ -438,6 +445,8 @@ def router(paramstring):
|
|||||||
login_with_key()
|
login_with_key()
|
||||||
elif params['action'] == 'login':
|
elif params['action'] == 'login':
|
||||||
login()
|
login()
|
||||||
|
elif params['action'] == 'export_key':
|
||||||
|
export_key()
|
||||||
elif params['action'] == 'user':
|
elif params['action'] == 'user':
|
||||||
list_users()
|
list_users()
|
||||||
elif params['action'] == 'logout':
|
elif params['action'] == 'logout':
|
||||||
|
|||||||
Reference in new issue
Block a user