diff --git a/core/servertools.py b/core/servertools.py
index 6e6f8a89..0511b9ed 100644
--- a/core/servertools.py
+++ b/core/servertools.py
@@ -294,6 +294,8 @@ def resolve_video_urls_for_playing(server, url, video_password="", muestra_dialo
logger.info("Servidor importado: %s" % server_module)
except:
server_module = None
+ if muestra_dialogo:
+ progreso.close()
logger.error("No se ha podido importar el servidor: %s" % server)
import traceback
logger.error(traceback.format_exc())
@@ -307,6 +309,8 @@ def resolve_video_urls_for_playing(server, url, video_password="", muestra_dialo
if not video_exists:
error_messages.append(message)
logger.info("test_video_exists dice que el video no existe")
+ if muestra_dialogo:
+ progreso.close()
else:
logger.info("test_video_exists dice que el video SI existe")
except:
diff --git a/resources/language/English/strings.po b/resources/language/English/strings.po
index f086a5ac..8546ac19 100644
--- a/resources/language/English/strings.po
+++ b/resources/language/English/strings.po
@@ -13,8 +13,6 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.0.4\n"
-"Last-Translator: MrTruth\n"
-"Last-Translator: Angedam\n"
"Language: en_EN\n"
msgctxt "#20000"
@@ -375,7 +373,7 @@ msgid "Square"
msgstr ""
msgctxt "#30300"
-msgid "Faster context menus"
+msgid "Delete also downloaded files?"
msgstr ""
msgctxt "#30501"
diff --git a/resources/language/Italian/strings.po b/resources/language/Italian/strings.po
index a78c9bb6..edac832a 100644
--- a/resources/language/Italian/strings.po
+++ b/resources/language/Italian/strings.po
@@ -13,8 +13,6 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.0.4\n"
-"Last-Translator: MrTruth\n"
-"Last-Translator: Angedam\n"
"Language: it_IT\n"
msgctxt "#20000"
@@ -374,8 +372,8 @@ msgid "Square"
msgstr "Square"
msgctxt "#30300"
-msgid "Faster context menus"
-msgstr "Menu contestuali rapidi (possono causare il mancato funzionamento di alcune opzioni)"
+msgid "Delete also downloaded files?"
+msgstr "Cancellare anche i file scaricati?"
msgctxt "#30501"
msgid "Path and folders"
diff --git a/resources/settings.xml b/resources/settings.xml
index 0a257bb7..805837cb 100644
--- a/resources/settings.xml
+++ b/resources/settings.xml
@@ -7,7 +7,6 @@
-
diff --git a/specials/downloads.py b/specials/downloads.py
index 76c7c56c..eeb75366 100644
--- a/specials/downloads.py
+++ b/specials/downloads.py
@@ -14,7 +14,6 @@ from past.utils import old_div
import re
import time
import unicodedata
-from threading import Thread
import xbmc
from channelselector import get_thumb
@@ -180,6 +179,9 @@ def del_dir(item):
def clean_all(item):
logger.info()
stop_all()
+ removeFiles = False
+ if platformtools.dialog_yesno(config.get_localized_string(20000), config.get_localized_string(30300)):
+ removeFiles = True
for fichero in sorted(filetools.listdir(DOWNLOAD_LIST_PATH)):
if fichero.endswith(".json"):
@@ -187,6 +189,9 @@ def clean_all(item):
if not item.contentType == "tvshow" or (
item.contentSerieName == download_item.contentSerieName and item.contentChannel == download_item.contentChannel):
filetools.remove(filetools.join(DOWNLOAD_LIST_PATH, fichero))
+ if removeFiles:
+ filetools.remove(filetools.join(DOWNLOAD_PATH, download_item.downloadFilename))
+
xbmc.sleep(100)
platformtools.itemlist_refresh()
@@ -231,9 +236,9 @@ def restart_error(item):
item.contentSerieName == download_item.contentSerieName and item.contentChannel == download_item.contentChannel):
if download_item.downloadStatus == STATUS_CODES.error:
if filetools.isfile(
- filetools.join(config.get_setting("downloadpath"), download_item.downloadFilename)):
+ filetools.join(DOWNLOAD_PATH, download_item.downloadFilename)):
filetools.remove(
- filetools.join(config.get_setting("downloadpath"), download_item.downloadFilename))
+ filetools.join(DOWNLOAD_PATH, download_item.downloadFilename))
update_json(item.path,
{"downloadStatus": STATUS_CODES.stoped, "downloadComplete": 0, "downloadProgress": 0})
@@ -312,6 +317,8 @@ def menu(item):
# Opcion Eliminar
if opciones[seleccion] == op[1]:
filetools.remove(item.path)
+ if platformtools.dialog_yesno(config.get_localized_string(20000), config.get_localized_string(30300)):
+ filetools.remove(filetools.join(DOWNLOAD_PATH, item.downloadFilename))
# Opcion inicaiar descarga
if opciones[seleccion] == op[0]:
@@ -324,8 +331,8 @@ def menu(item):
# Reiniciar descarga
if opciones[seleccion] == op[2]:
- if filetools.isfile(filetools.join(config.get_setting("downloadpath"), item.downloadFilename)):
- filetools.remove(filetools.join(config.get_setting("downloadpath"), item.downloadFilename))
+ if filetools.isfile(filetools.join(DOWNLOAD_PATH, item.downloadFilename)):
+ filetools.remove(filetools.join(DOWNLOAD_PATH, item.downloadFilename))
update_json(item.path, {"downloadStatus": STATUS_CODES.stoped, "downloadComplete": 0, "downloadProgress": 0,
"downloadServer": {}})
@@ -355,7 +362,7 @@ def move_to_libray(item):
path_title = "%s [%s]" % (title, item.infoLabels['IMDBNumber'])
move_path = filetools.join(config.get_videolibrary_path(), FOLDER)
- download_path = filetools.join(config.get_setting("downloadpath"), item.downloadFilename)
+ download_path = filetools.join(DOWNLOAD_PATH, item.downloadFilename)
library_path = filetools.join(move_path, *filetools.split(item.downloadFilename))
final_path = download_path
@@ -569,7 +576,7 @@ def download_from_url(url, item):
return {"downloadStatus": STATUS_CODES.error}
# Obtenemos la ruta de descarga y el nombre del archivo
- item.downloadFilename = item.downloadFilename.replace('/','-')
+ item.downloadFilename = item.downloadFilename
download_path = filetools.dirname(filetools.join(DOWNLOAD_PATH, item.downloadFilename))
file_name = filetools.basename(filetools.join(DOWNLOAD_PATH, item.downloadFilename))
@@ -784,7 +791,7 @@ def select_server(item):
return play_items[seleccion - 1]
elif seleccion == 0:
update_json(item.path, {"downloadServer": {}})
- return play_items[0]
+ return 'Auto'
# platformtools.itemlist_refresh()
@@ -902,7 +909,7 @@ def write_json(item):
if name in item.__dict__:
item.__dict__.pop(name)
- path = filetools.join(config.get_setting("downloadlistpath"), str(time.time()) + ".json")
+ path = filetools.join(DOWNLOAD_LIST_PATH, str(time.time()) + ".json")
item.path = path
filetools.write(path, item.tojson())
time.sleep(0.1)
@@ -922,7 +929,6 @@ def save_download(item):
def save_download_background(item):
logger.info()
-
# Menu contextual
if item.from_action and item.from_channel:
item.channel = item.from_channel