From a6752025375875470a9705ea5fe9ccb6154a59dc Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sat, 18 Jul 2020 15:19:42 -0700 Subject: [PATCH] Browse path starting from from current value --- data/interfaces/default/app_import.html | 6 +--- data/interfaces/default/config_import.html | 6 +--- data/interfaces/default/notifier_config.html | 9 +----- data/interfaces/default/settings.html | 31 +++++++++++--------- plexpy/helpers.py | 3 ++ 5 files changed, 23 insertions(+), 32 deletions(-) diff --git a/data/interfaces/default/app_import.html b/data/interfaces/default/app_import.html index ab7ef27b..a96009a7 100644 --- a/data/interfaces/default/app_import.html +++ b/data/interfaces/default/app_import.html @@ -40,7 +40,7 @@
- +
@@ -114,10 +114,6 @@
diff --git a/plexpy/helpers.py b/plexpy/helpers.py index b6d7ba1a..07785582 100644 --- a/plexpy/helpers.py +++ b/plexpy/helpers.py @@ -1232,6 +1232,9 @@ def browse_path(path=None, include_hidden=False, filter_ext=''): } output.append(out) + if os.path.isfile(path): + path = os.path.dirname(path) + if not os.path.isdir(path): return output