pass prefix to parse_path
This commit is contained in:
parent
41101d9b34
commit
4b6c771f81
1 changed files with 3 additions and 3 deletions
|
@ -83,7 +83,7 @@ def encode_cmd(filename, prefix, profile, info):
|
||||||
media_f = os.path.join(cache, profile)
|
media_f = os.path.join(cache, profile)
|
||||||
return extract.video_cmd(filename, media_f, profile, info)
|
return extract.video_cmd(filename, media_f, profile, info)
|
||||||
|
|
||||||
def parse_path(client, path):
|
def parse_path(client, path, prefix=None):
|
||||||
'''
|
'''
|
||||||
args:
|
args:
|
||||||
path - path without volume prefix
|
path - path without volume prefix
|
||||||
|
@ -277,7 +277,7 @@ class Client(object):
|
||||||
for prefix in prefixes:
|
for prefix in prefixes:
|
||||||
if path.startswith(prefix) and os.path.exists(path):
|
if path.startswith(prefix) and os.path.exists(path):
|
||||||
path = path[len(prefix):]
|
path = path[len(prefix):]
|
||||||
i = parse_path(self, path)
|
i = parse_path(self, path, prefix)
|
||||||
if i:
|
if i:
|
||||||
_info.update(i)
|
_info.update(i)
|
||||||
return _info
|
return _info
|
||||||
|
@ -522,7 +522,7 @@ class Client(object):
|
||||||
else:
|
else:
|
||||||
ignored.append(file_path)
|
ignored.append(file_path)
|
||||||
for f in files:
|
for f in files:
|
||||||
if not parse_path(self, f[len(path):]):
|
if not parse_path(self, f[len(path):], path):
|
||||||
unknown.append(f)
|
unknown.append(f)
|
||||||
|
|
||||||
files = sorted(set(files) - set(unknown))
|
files = sorted(set(files) - set(unknown))
|
||||||
|
|
Loading…
Reference in a new issue