diff --git a/index_for_search.py b/index_for_search.py index 36c7a35..e1b0679 100755 --- a/index_for_search.py +++ b/index_for_search.py @@ -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)