Don't verify detected music paths
This commit is contained in:
parent
cbb44e4ccf
commit
3d7caec69a
2 changed files with 6 additions and 3 deletions
|
@ -2509,7 +2509,8 @@ class API():
|
|||
listItem.addStreamInfo(
|
||||
"video", {'duration': self.getRuntime()[1]})
|
||||
|
||||
def validatePlayurl(self, path, typus, forceCheck=False, folder=False):
|
||||
def validatePlayurl(self, path, typus, forceCheck=False, folder=False,
|
||||
omitCheck=False):
|
||||
"""
|
||||
Returns a valid path for Kodi, e.g. with '\' substituted to '\\' in
|
||||
Unicode. Returns None if this is not possible
|
||||
|
@ -2519,6 +2520,7 @@ class API():
|
|||
forceCheck : Will always try to check validity of path
|
||||
Will also skip confirmation dialog if path not found
|
||||
folder : Set to True if path is a folder
|
||||
omitCheck : Will entirely omit validity check if True
|
||||
"""
|
||||
if path is None:
|
||||
return None
|
||||
|
@ -2532,7 +2534,8 @@ class API():
|
|||
elif window('replaceSMB') == 'true':
|
||||
if path.startswith('\\\\'):
|
||||
path = 'smb:' + path.replace('\\', '/')
|
||||
if window('plex_pathverified') == 'true' and forceCheck is False:
|
||||
if ((window('plex_pathverified') == 'true' and forceCheck is False) or
|
||||
omitCheck is True):
|
||||
return path
|
||||
|
||||
# exist() needs a / or \ at the end to work for directories
|
||||
|
|
|
@ -64,7 +64,7 @@ def set_excludefromscan_music_folders():
|
|||
if location.tag == 'Location':
|
||||
path = api.validatePlayurl(location.attrib['path'],
|
||||
typus=v.PLEX_TYPE_ARTIST,
|
||||
forceCheck=True)
|
||||
omitCheck=True)
|
||||
path = tryEncode(path)
|
||||
paths.append(__turn_to_regex(path))
|
||||
# Get existing advancedsettings
|
||||
|
|
Loading…
Reference in a new issue