Compare commits

..

2 Commits

Author SHA1 Message Date
2c6b856f66 Merge branch 'development' of gitea.centx.de:lelo/bethaus-app into development 2025-04-19 10:10:03 +02:00
0050374ed0 fix indexing 2025-04-19 10:09:59 +02:00

View File

@ -119,6 +119,7 @@ def updatefileindex():
scanned_files = [] # Each entry: (relative_path, basefolder, filename, filetype, transcript, hitcount) scanned_files = [] # Each entry: (relative_path, basefolder, filename, filetype, transcript, hitcount)
current_keys = set() current_keys = set()
for entry in scan_dir(norm_folderpath): for entry in scan_dir(norm_folderpath):
transcript = None
entry_path = os.path.normpath(entry.path) entry_path = os.path.normpath(entry.path)
# Get relative part by slicing if possible. # Get relative part by slicing if possible.
if entry_path.startswith(norm_folderpath): if entry_path.startswith(norm_folderpath):
@ -141,7 +142,6 @@ def updatefileindex():
site = 'Schwegenheim' site = 'Schwegenheim'
if filetype == '.mp3': if filetype == '.mp3':
transcript = None
# Check for a corresponding transcript file in a sibling "Transkription" folder. # Check for a corresponding transcript file in a sibling "Transkription" folder.
parent_dir = os.path.dirname(entry_path) parent_dir = os.path.dirname(entry_path)