diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 9119024..67476a6 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,16 +1,9 @@ - - - + - - - - - @@ -40,13 +33,12 @@ - + - - + + - @@ -55,7 +47,6 @@ - @@ -92,40 +83,46 @@ - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -135,7 +132,7 @@ - + @@ -145,27 +142,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -219,7 +216,7 @@ - + @@ -249,18 +246,20 @@ - + - - + + - + + + @@ -270,7 +269,6 @@ - @@ -278,26 +276,49 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -342,11 +363,11 @@ - + - - + + @@ -401,7 +422,6 @@ @@ -471,6 +492,8 @@ + + @@ -585,8 +608,6 @@ - - @@ -768,18 +789,6 @@ @@ -1076,14 +1097,13 @@ - + - - + @@ -1096,6 +1116,7 @@ + @@ -1112,7 +1133,6 @@ - @@ -1122,7 +1142,6 @@ - @@ -1137,29 +1156,17 @@ - - - - - - - - - - - - - - - - @@ -1265,13 +1272,6 @@ - - - - - - - @@ -1478,10 +1478,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -1510,20 +1543,108 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - @@ -1532,7 +1653,6 @@ - @@ -1568,100 +1688,19 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + + + @@ -1671,7 +1710,6 @@ - @@ -1679,31 +1717,24 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + 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/Core.py b/Core.py index cfdfa22..3e74ee0 100644 --- a/Core.py +++ b/Core.py @@ -1869,7 +1869,6 @@ class Core: def callback(self, params={}): get = params.get - external = unquote(get("external"), None) subaction = unquote(get("subaction"), None) url = unquote(get("url"),'') sdata = unquote(get("sdata"),'{}') @@ -1907,5 +1906,6 @@ class Core: xbmc.executebuiltin('xbmc.RunPlugin("plugin://plugin.video.torrenter/?action=playTorrent&url=' + fileIndex + '")') return - sdata['filename'] = url - xbmc.executebuiltin('xbmc.RunPlugin("' + back_url + '&stringdata=' + json.dumps(sdata) + '")') + sdata['filename'] = ensure_str(url) + #log('[call]: '+sdata['filename']+json.loads(json.dumps(sdata))['filename']) + xbmc.executebuiltin('xbmc.RunPlugin(%s&stringdata=%s)' % (back_url, urllib.quote_plus(json.dumps(sdata)))) diff --git a/Downloader.py b/Downloader.py index 5a1c251..337e1f3 100644 --- a/Downloader.py +++ b/Downloader.py @@ -49,7 +49,7 @@ class Torrent(): def get_torrent_client(self): player = self.__settings__.getSetting("torrent_player") - if player == '0' or '4': + if player == '0' or player == '4': self.player = 'libtorrent' elif player == '1': self.player = 'acestream' 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: