allow recursive file searches

pull/503/head
meisnate12 3 years ago
parent 64248ee879
commit 4d27090f44

@ -260,7 +260,7 @@ class Library(ABC):
if os.path.isdir(os.path.join(ad, name)):
item_dir = os.path.join(ad, name)
else:
matches = util.glob_filter(os.path.join(ad, "*", name))
matches = util.glob_filter(os.path.join(ad, "**", name))
if len(matches) > 0:
item_dir = os.path.abspath(matches[0])
if item_dir is None:

@ -631,7 +631,7 @@ class Plex(Library):
if os.path.isdir(os.path.join(ad, name)):
item_dir = os.path.join(ad, name)
else:
matches = util.glob_filter(os.path.join(ad, "*", name))
matches = util.glob_filter(os.path.join(ad, "**", name))
if len(matches) > 0:
item_dir = os.path.abspath(matches[0])
if item_dir is None:

@ -279,7 +279,7 @@ def time_window(time_window):
def glob_filter(filter_in):
filter_in = filter_in.translate({ord("["): "[[]", ord("]"): "[]]"}) if "[" in filter_in else filter_in
return glob.glob(filter_in)
return glob.glob(filter_in, recursive=True)
def is_date_filter(value, modifier, data, final, current_time):
if value is None:

Loading…
Cancel
Save