fix indexing

This commit is contained in:
lelo 2025-04-19 10:09:59 +02:00
parent 787f799ab1
commit 0050374ed0

View File

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