tmp fix
parent
e34f81208a
commit
fc76738fc5
6
Core.py
6
Core.py
|
@ -48,16 +48,18 @@ class Core:
|
|||
|
||||
def __init__(self):
|
||||
print '!!!!!!!!!!!!!!!!!! BORN '+self.__class__.__name__
|
||||
if 0 == len(self.userStorageDirectory):
|
||||
download_dir = download_dir_check()
|
||||
if len(self.userStorageDirectory) == 0:
|
||||
download_dir = get_download_dir()
|
||||
else:
|
||||
download_dir = self.userStorageDirectory
|
||||
self.userStorageDirectory = os.path.join(download_dir, 'Torrenter')
|
||||
|
||||
def sectionMenu(self):
|
||||
if self.__settings__.getSetting('plugin_name')!=self.__plugin__:
|
||||
#Every update run
|
||||
self.__settings__.setSetting('plugin_name',self.__plugin__)
|
||||
check_network_advancedsettings()
|
||||
check_download_dir()
|
||||
if self.__plugin__ == 'Torrenter v.2.3.7':
|
||||
#first_run_231()
|
||||
pass
|
||||
|
|
11
functions.py
11
functions.py
|
@ -1821,7 +1821,7 @@ def check_network_advancedsettings():
|
|||
else:
|
||||
print 'UPDATE advancedsettings.xml disabled by user!'
|
||||
|
||||
def download_dir_check():
|
||||
def get_download_dir():
|
||||
from platform_pulsar import get_platform
|
||||
import tempfile
|
||||
platform = get_platform()
|
||||
|
@ -1838,4 +1838,11 @@ def download_dir_check():
|
|||
download_dir = tempdir()
|
||||
except:
|
||||
download_dir = tempdir()
|
||||
return download_dir
|
||||
return download_dir
|
||||
|
||||
def check_download_dir():
|
||||
if len(__settings__.getSetting("storage"))==0:
|
||||
dialog=xbmcgui.Dialog()
|
||||
dialog.ok(Localization.localize('Torrenter'),
|
||||
Localization.localize('Please specify storage folder in Settings!'))
|
||||
__settings__.openSettings()
|
||||
|
|
Loading…
Reference in New Issue