* Resolve #502 with making the extension lowercase. Add note to `EXT_MAP` reference. * Fixed comment for linting, added more details.
This commit is contained in:
parent
cd25eadd1c
commit
865089d46d
|
@ -31,6 +31,9 @@ class ImportFolderScanner:
|
|||
CACHE_DIR = CONFIG["application"]["cache_dir"]
|
||||
IMPORT_DIR = os.path.join(CACHE_DIR, "import")
|
||||
|
||||
"""All extensions should be in lowercase until better handling is in place.
|
||||
Described in Issue #502.
|
||||
"""
|
||||
EXT_MAP = {
|
||||
"media": [".mp4", ".mkv", ".webm"],
|
||||
"metadata": [".json"],
|
||||
|
@ -118,7 +121,7 @@ class ImportFolderScanner:
|
|||
"""detect metadata type for file"""
|
||||
|
||||
for key, value in self.EXT_MAP.items():
|
||||
if ext in value:
|
||||
if ext.lower() in value:
|
||||
return key, file_path
|
||||
|
||||
return False, False
|
||||
|
|
Loading…
Reference in New Issue