создаём каталог

master
Бородин Роман 2019-05-05 13:17:16 +03:00
parent 041e70b61d
commit 9417579c4d
3 changed files with 6 additions and 13 deletions

View File

@ -21,13 +21,6 @@
<email>roman@ukamnya.ru</email> <email>roman@ukamnya.ru</email>
<platform>all</platform> <platform>all</platform>
<language>en_GB ru_RU</language> <language>en_GB ru_RU</language>
<assets>
<icon>icon.png</icon>
<fanart>resources/fanart.jpg</fanart>
<!-- <screenshot>resources/screenshots/screenshot000.jpg</screenshot>
<screenshot>resources/screenshots/screenshot001.jpg</screenshot>
<screenshot>resources/screenshots/screenshot002.jpg</screenshot> -->
</assets>
<news>- 3.0.1: first rewrited version</news> <news>- 3.0.1: first rewrited version</news>
<reuselanguageinvoker>true</reuselanguageinvoker> <reuselanguageinvoker>true</reuselanguageinvoker>
</extension> </extension>

View File

@ -2,8 +2,3 @@ from codequick.script import Settings # @UnresolvedImport
import os import os
option = Settings() 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)

View File

@ -1,7 +1,7 @@
from codequick.support import addon_data # @UnresolvedImport from codequick.support import addon_data # @UnresolvedImport
from codequick.listing import local_image # @UnresolvedImport from codequick.listing import local_image # @UnresolvedImport
from urlquick import urljoin # @UnresolvedImport from urlquick import urljoin # @UnresolvedImport
from ..settings import option, storage_toorents_dir, storage_download_dir from ..settings import option
import xbmcgui import xbmcgui
import os import os
from hashlib import sha1 from hashlib import sha1
@ -43,3 +43,8 @@ while not option['storage_dir']:
dialog = xbmcgui.Dialog() dialog = xbmcgui.Dialog()
dialog.ok(localize(33000), localize(33051)) dialog.ok(localize(33000), localize(33051))
addon_data.openSettings() 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)