From d0bb94b779003ed16135d5a3928996384a7bac26 Mon Sep 17 00:00:00 2001 From: DiMartinoXBMC Date: Tue, 22 Mar 2016 19:48:48 +0300 Subject: [PATCH] fixes --- Anteoloader.py | 1 + Localization.py | 4 ++-- functions.py | 7 +++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Anteoloader.py b/Anteoloader.py index 1a8fb31..77bb932 100644 --- a/Anteoloader.py +++ b/Anteoloader.py @@ -560,6 +560,7 @@ class AnteoPlayer(xbmc.Player): if pause and self.__settings__.getSetting("pause_onplay") == 'true': pause = False xbmc.Player().pause() + log('[loop]: xbmc.Player().pause()') xbmc.sleep(1000) #if not self.seeding_run and self.iterator == 100 and self.seeding: diff --git a/Localization.py b/Localization.py index 80f0800..ff2fd79 100644 --- a/Localization.py +++ b/Localization.py @@ -71,7 +71,7 @@ def localize(text): 'Torrent Downloading': 'טורנט בהורדה', 'Auth expired, please relogin': 'Auth expired, please relogin', 'Storage': 'אחסון', - 'Storage was cleared': 'אחסון נוקה', + 'Storage has been cleared': 'אחסון נוקה', 'Clear Storage': 'נקה אחסון', 'Popular': 'פופולארי', 'Views': 'צפיות', @@ -330,7 +330,7 @@ def localize(text): 'Torrent Downloading': 'Загрузка торрента', 'Auth expired, please relogin': 'Авторизация истекла, пожалуйста войдите снова', 'Storage': 'Хранилище', - 'Storage was cleared': 'Хранилище очищено', + 'Storage has been cleared': 'Хранилище очищено', 'Clear Storage': 'Очистить хранилище', 'Popular': 'Популярное', 'Views': 'Просмотров', diff --git a/functions.py b/functions.py index e7e8fa1..d083874 100644 --- a/functions.py +++ b/functions.py @@ -55,7 +55,7 @@ def clearStorage(userStorageDirectory, force = False): userStorageDirectory = decode(userStorageDirectory) #log('[clearStorage]: storage '+str(userStorageDirectory) + os.sep) min_storage_size = __settings__.getSetting("min_storage_size") - storage_size = getDirectorySizeInGB(userStorageDirectory) + storage_size = getDirectorySizeInGB(userStorageDirectory.encode('utf-8')) if storage_size >= min_storage_size or force: if xbmcvfs.exists(userStorageDirectory + os.sep) or os.path.exists(userStorageDirectory): log('[clearStorage]: storage exists') @@ -83,7 +83,8 @@ def clearStorage(userStorageDirectory, force = False): shutil.move(saved, saved_temp) saved_bool = True - shutil.rmtree(userStorageDirectory.encode('utf-8'), ignore_errors=True) + shutil.rmtree(userStorageDirectory, ignore_errors=True) + #log(str(xbmcvfs.listdir(userStorageDirectory))) xbmcvfs.mkdir(userStorageDirectory) if torrents_bool: @@ -102,8 +103,6 @@ def clearStorage(userStorageDirectory, force = False): except Exception, e: log('[clearStorage]: DownloadDB().clear() failed. '+str(e)) - showMessage(Localization.localize('Storage'), Localization.localize('Storage was cleared'), forced=True) - def sortcomma(dict, json): for x in dict: