Compare commits
No commits in common. "27e42a4e9731ca33c9738e98846891dbc30dc37b" and "20e65f4c696aaee3e501fdcba45af4597d2b967c" have entirely different histories.
27e42a4e97
...
20e65f4c69
9
app.py
9
app.py
@ -24,7 +24,6 @@ import auth
|
||||
import analytics as a
|
||||
import folder_secret_config_editor as fsce
|
||||
import helperfunctions as hf
|
||||
import fnmatch
|
||||
|
||||
app_config = auth.return_app_config()
|
||||
BASE_DIR = os.path.realpath(app_config['BASE_DIR'])
|
||||
@ -137,7 +136,7 @@ def list_directory_contents(directory, subpath):
|
||||
music_exts = ('.mp3',)
|
||||
image_exts = ('.jpg', '.jpeg', '.png', '.gif', '.bmp')
|
||||
|
||||
blocked_filenames = ['Thumbs.db', '*.mrk']
|
||||
blocked_filenames = ['Thumbs.db']
|
||||
|
||||
try:
|
||||
with os.scandir(directory) as it:
|
||||
@ -147,12 +146,12 @@ def list_directory_contents(directory, subpath):
|
||||
if entry.name.startswith('.'):
|
||||
continue
|
||||
|
||||
# Skip blocked_filenames using fnmatch for wildcards
|
||||
if any(fnmatch.fnmatch(entry.name, pattern) for pattern in blocked_filenames):
|
||||
# Skip blocked_filenames
|
||||
if entry.name in blocked_filenames:
|
||||
continue
|
||||
|
||||
if entry.is_dir(follow_symlinks=False):
|
||||
if entry.name in ["Transkription", "@eaDir", ".ai"]:
|
||||
if entry.name in ["Transkription", "@eaDir"]:
|
||||
continue
|
||||
rel_path = os.path.join(subpath, entry.name) if subpath else entry.name
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user