Return false on non existing dirs

This commit is contained in:
David
2014-08-17 19:48:47 +02:00
parent 17ef29887e
commit 1b65df6c45

View File

@@ -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: