pass prefix to parse_path

This commit is contained in:
j 2016-08-03 11:40:36 +02:00
parent 41101d9b34
commit 4b6c771f81

View file

@ -83,7 +83,7 @@ def encode_cmd(filename, prefix, profile, info):
media_f = os.path.join(cache, profile)
return extract.video_cmd(filename, media_f, profile, info)
def parse_path(client, path):
def parse_path(client, path, prefix=None):
'''
args:
path - path without volume prefix
@ -277,7 +277,7 @@ class Client(object):
for prefix in prefixes:
if path.startswith(prefix) and os.path.exists(path):
path = path[len(prefix):]
i = parse_path(self, path)
i = parse_path(self, path, prefix)
if i:
_info.update(i)
return _info
@ -522,7 +522,7 @@ class Client(object):
else:
ignored.append(file_path)
for f in files:
if not parse_path(self, f[len(path):]):
if not parse_path(self, f[len(path):], path):
unknown.append(f)
files = sorted(set(files) - set(unknown))