Fix regression: fix add-on paths always falling back to direct paths

This commit is contained in:
croneter 2021-05-02 14:10:33 +02:00
parent a6eb60bf1a
commit 7760174900

View file

@ -369,7 +369,8 @@ class Media(object):
force_check : Will always try to check validity of path force_check : 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
omit_check : Will entirely omit validity check if True omit_check : Will entirely omit validity check if True. Will
be superseded by force_check!
""" """
if path is None: if path is None:
return return
@ -385,9 +386,13 @@ class Media(object):
path = 'smb:' + path.replace('\\', '/') path = 'smb:' + path.replace('\\', '/')
if app.SYNC.escape_path: if app.SYNC.escape_path:
path = utils.escape_path(path, app.SYNC.escape_path_safe_chars) path = utils.escape_path(path, app.SYNC.escape_path_safe_chars)
if (not app.SYNC.check_media_file_existence if force_check:
or (app.SYNC.path_verified and not force_check) pass
or omit_check): elif omit_check:
return path
elif not app.SYNC.check_media_file_existence:
return path
elif app.SYNC.path_verified:
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