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