Create addondir directory
This allows to make the addon work right away, without a Kodi restart. Step to eliminate the need to restart Kodi after setting the sources, etc.
This commit is contained in:
parent
e9680e3d33
commit
287677f683
1 changed files with 24 additions and 2 deletions
|
@ -55,6 +55,28 @@ def checkKodiSources():
|
|||
tvLibrary = os.path.join(dataPath,'tvshows')
|
||||
musicvideoLibrary = os.path.join(dataPath,'musicvideos')
|
||||
|
||||
# If no folder exists at the time, create it.
|
||||
if xbmcvfs.exists(addondir) == False:
|
||||
xbmcvfs.mkdir(addondir)
|
||||
xbmc.log("Manually created %s" % addondir)
|
||||
|
||||
if not xbmcvfs.exists(dataPath + os.sep):
|
||||
xbmcvfs.mkdir(dataPath)
|
||||
if not xbmcvfs.exists(movieLibrary + os.sep):
|
||||
xbmcvfs.mkdir(movieLibrary)
|
||||
addKodiSource("mediabrowser_movies",movieLibrary,"movies")
|
||||
if not xbmcvfs.exists(tvLibrary + os.sep):
|
||||
xbmcvfs.mkdir(tvLibrary)
|
||||
addKodiSource("mediabrowser_tvshows",tvLibrary,"tvshows")
|
||||
if not xbmcvfs.exists(musicvideoLibrary + os.sep):
|
||||
xbmcvfs.mkdir(musicvideoLibrary)
|
||||
addKodiSource("mediabrowser_musicvideos",musicvideoLibrary,"musicvideos")
|
||||
|
||||
KodiAdvancedSettingsCheck()
|
||||
|
||||
return True
|
||||
|
||||
''' To be deleted once fully tested - Angel
|
||||
rebootRequired = False
|
||||
|
||||
if not xbmcvfs.exists(dataPath + os.sep):
|
||||
|
@ -81,7 +103,7 @@ def checkKodiSources():
|
|||
else:
|
||||
return False
|
||||
|
||||
return True
|
||||
return True'''
|
||||
|
||||
def KodiSQL():
|
||||
if xbmc.getInfoLabel("System.BuildVersion").startswith("13"):
|
||||
|
@ -279,4 +301,4 @@ def stopProfiling(pr, profileName):
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue