Change to xbmcvfs mkdirs
This commit is contained in:
parent
4eb2e5a08c
commit
216159d96c
4 changed files with 13 additions and 10 deletions
|
@ -40,10 +40,10 @@ from re import compile as re_compile, sub
|
|||
from json import dumps
|
||||
from urllib import urlencode, quote_plus, unquote
|
||||
from os.path import basename, join, exists
|
||||
from os import makedirs
|
||||
|
||||
import xbmcgui
|
||||
from xbmc import sleep, executebuiltin
|
||||
from xbmcvfs import mkdirs
|
||||
|
||||
import clientinfo as client
|
||||
from downloadutils import DownloadUtils
|
||||
|
@ -2345,7 +2345,7 @@ class API():
|
|||
Returns the path to the downloaded subtitle or None
|
||||
"""
|
||||
if not exists(v.EXTERNAL_SUBTITLE_TEMP_PATH):
|
||||
makedirs(v.EXTERNAL_SUBTITLE_TEMP_PATH)
|
||||
mkdirs(v.EXTERNAL_SUBTITLE_TEMP_PATH)
|
||||
path = join(v.EXTERNAL_SUBTITLE_TEMP_PATH, filename)
|
||||
r = DownloadUtils().downloadUrl(url, return_response=True)
|
||||
try:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
###############################################################################
|
||||
import logging
|
||||
from shutil import copyfile
|
||||
from os import walk, makedirs
|
||||
from os import walk
|
||||
from os.path import basename, join, exists
|
||||
from sys import argv
|
||||
from urllib import urlencode
|
||||
|
@ -10,6 +10,7 @@ from urllib import urlencode
|
|||
import xbmcplugin
|
||||
from xbmc import sleep, executebuiltin, translatePath
|
||||
from xbmcgui import ListItem
|
||||
from xbmcvfs import mkdirs
|
||||
|
||||
from utils import window, settings, language as lang, dialog, tryEncode, \
|
||||
CatchExceptions, JSONRPC
|
||||
|
@ -538,7 +539,7 @@ def getExtraFanArt(plexid, plexPath):
|
|||
fanartDir = translatePath("special://thumbnails/plex/%s/" % plexid)
|
||||
if not exists(fanartDir):
|
||||
# Download the images to the cache directory
|
||||
makedirs(fanartDir)
|
||||
mkdirs(fanartDir)
|
||||
xml = GetPlexMetadata(plexid)
|
||||
if xml is None:
|
||||
log.error('Could not download metadata for %s' % plexid)
|
||||
|
|
|
@ -13,14 +13,15 @@ from unicodedata import normalize
|
|||
import xml.etree.ElementTree as etree
|
||||
from functools import wraps
|
||||
from calendar import timegm
|
||||
from os.path import exists, join
|
||||
from os import remove, makedirs, walk
|
||||
from os.path import join
|
||||
from os import remove, walk
|
||||
from shutil import rmtree
|
||||
from urllib import quote_plus
|
||||
|
||||
import xbmc
|
||||
import xbmcaddon
|
||||
import xbmcgui
|
||||
from xbmcvfs import exists as kodi_exists, mkdirs
|
||||
|
||||
from variables import DB_VIDEO_PATH, DB_MUSIC_PATH, DB_TEXTURE_PATH, \
|
||||
DB_PLEX_PATH, KODI_PROFILE
|
||||
|
@ -784,7 +785,7 @@ def playlistXSP(mediatype, tagname, viewid, viewtype="", delete=False):
|
|||
# Create the playlist directory
|
||||
if not exists(path):
|
||||
log.info("Creating directory: %s" % path)
|
||||
makedirs(path)
|
||||
mkdirs(path)
|
||||
|
||||
# Only add the playlist if it doesn't already exists
|
||||
if exists(xsppath):
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
import logging
|
||||
from shutil import copytree
|
||||
import xml.etree.ElementTree as etree
|
||||
from os import remove, listdir
|
||||
from os.path import exists, isfile, join
|
||||
|
||||
import xbmc
|
||||
from os import remove, makedirs, listdir
|
||||
from os.path import exists, isfile, join
|
||||
from xbmcvfs import mkdirs
|
||||
|
||||
from utils import window, settings, language as lang, tryEncode, indent, \
|
||||
normalize_nodes
|
||||
|
@ -84,7 +85,7 @@ class VideoNodes(object):
|
|||
if exists(nodepath) is False:
|
||||
# folder does not exist yet
|
||||
log.debug('Creating folder %s' % nodepath)
|
||||
makedirs(nodepath)
|
||||
mkdirs(nodepath)
|
||||
|
||||
# Create index entry
|
||||
nodeXML = "%sindex.xml" % nodepath
|
||||
|
|
Loading…
Reference in a new issue