pull/1/head
DiMartinoXBMC 2015-08-09 18:09:23 +03:00
parent e34f81208a
commit fc76738fc5
2 changed files with 13 additions and 4 deletions

View File

@ -48,16 +48,18 @@ class Core:
def __init__(self): def __init__(self):
print '!!!!!!!!!!!!!!!!!! BORN '+self.__class__.__name__ print '!!!!!!!!!!!!!!!!!! BORN '+self.__class__.__name__
if 0 == len(self.userStorageDirectory): if len(self.userStorageDirectory) == 0:
download_dir = download_dir_check() download_dir = get_download_dir()
else: else:
download_dir = self.userStorageDirectory download_dir = self.userStorageDirectory
self.userStorageDirectory = os.path.join(download_dir, 'Torrenter') self.userStorageDirectory = os.path.join(download_dir, 'Torrenter')
def sectionMenu(self): def sectionMenu(self):
if self.__settings__.getSetting('plugin_name')!=self.__plugin__: if self.__settings__.getSetting('plugin_name')!=self.__plugin__:
#Every update run
self.__settings__.setSetting('plugin_name',self.__plugin__) self.__settings__.setSetting('plugin_name',self.__plugin__)
check_network_advancedsettings() check_network_advancedsettings()
check_download_dir()
if self.__plugin__ == 'Torrenter v.2.3.7': if self.__plugin__ == 'Torrenter v.2.3.7':
#first_run_231() #first_run_231()
pass pass

View File

@ -1821,7 +1821,7 @@ def check_network_advancedsettings():
else: else:
print 'UPDATE advancedsettings.xml disabled by user!' print 'UPDATE advancedsettings.xml disabled by user!'
def download_dir_check(): def get_download_dir():
from platform_pulsar import get_platform from platform_pulsar import get_platform
import tempfile import tempfile
platform = get_platform() platform = get_platform()
@ -1839,3 +1839,10 @@ def download_dir_check():
except: except:
download_dir = tempdir() 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()