From 1b65df6c4574b094d9d6115eede6b4547bd80eac Mon Sep 17 00:00:00 2001 From: David Date: Sun, 17 Aug 2014 19:48:47 +0200 Subject: [PATCH] Return false on non existing dirs --- headphones/postprocessor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/headphones/postprocessor.py b/headphones/postprocessor.py index e102a4d2..b4381934 100644 --- a/headphones/postprocessor.py +++ b/headphones/postprocessor.py @@ -36,6 +36,8 @@ def find_in_path(albumpath, extra_formats=None, use_MF=True): Finds files matching the MEDIA_FORMATS and returns them as a list. If use_MF is disabled MEDIA_FORMATS will be ignored. """ + if not os.path.isdir(albumpath): + return False found_tracks = [] if extra_formats: if type(extra_formats) is not list: