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):
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

View File

@ -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()
@ -1839,3 +1839,10 @@ def download_dir_check():
except:
download_dir = tempdir()
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()