From 9417579c4dca21a7cc9662e3f146a497b384b6ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=BE=D1=80=D0=BE=D0=B4=D0=B8=D0=BD=20=D0=A0=D0=BE?= =?UTF-8?q?=D0=BC=D0=B0=D0=BD?= Date: Sun, 5 May 2019 13:17:16 +0300 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D1=91=D0=BC=20?= =?UTF-8?q?=D0=BA=D0=B0=D1=82=D0=B0=D0=BB=D0=BE=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addon.xml | 7 ------- resources/lib/settings.py | 5 ----- resources/lib/utils/__init__.py | 7 ++++++- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/addon.xml b/addon.xml index 93670f1..6b1b7c2 100644 --- a/addon.xml +++ b/addon.xml @@ -21,13 +21,6 @@ roman@ukamnya.ru all en_GB ru_RU - - icon.png - resources/fanart.jpg - - - 3.0.1: first rewrited version true diff --git a/resources/lib/settings.py b/resources/lib/settings.py index 8b7c7cb..11d414b 100644 --- a/resources/lib/settings.py +++ b/resources/lib/settings.py @@ -2,8 +2,3 @@ from codequick.script import Settings # @UnresolvedImport import os option = Settings() -storage_root = os.path.abspath(os.path.join(option['storage_dir'], 'Torrenter3')) -storage_toorents_dir = os.path.join(storage_root, 'torrents') -storage_download_dir = os.path.join(storage_root, 'download') -if not os.path.exists(storage_toorents_dir): os.makedirs(storage_toorents_dir) -if not os.path.exists(storage_download_dir): os.makedirs(storage_download_dir) diff --git a/resources/lib/utils/__init__.py b/resources/lib/utils/__init__.py index a9c9fd1..e44adb4 100644 --- a/resources/lib/utils/__init__.py +++ b/resources/lib/utils/__init__.py @@ -1,7 +1,7 @@ from codequick.support import addon_data # @UnresolvedImport from codequick.listing import local_image # @UnresolvedImport from urlquick import urljoin # @UnresolvedImport -from ..settings import option, storage_toorents_dir, storage_download_dir +from ..settings import option import xbmcgui import os from hashlib import sha1 @@ -43,3 +43,8 @@ while not option['storage_dir']: dialog = xbmcgui.Dialog() dialog.ok(localize(33000), localize(33051)) addon_data.openSettings() +storage_root = os.path.abspath(os.path.join(option['storage_dir'], 'Torrenter3')) +storage_toorents_dir = os.path.join(storage_root, 'torrents') +storage_download_dir = os.path.join(storage_root, 'download') +if not os.path.exists(storage_toorents_dir): os.makedirs(storage_toorents_dir) +if not os.path.exists(storage_download_dir): os.makedirs(storage_download_dir)