*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 044a03dd authored by Moser, Maximilian's avatar Moser, Maximilian
Browse files

Fix up filenames in formatscaper results

parent 59945a43
No related branches found
No related tags found
1 merge request!17Minor formatscaper updates
...@@ -221,11 +221,16 @@ def process_record_file(record_file: RecordFile) -> None: ...@@ -221,11 +221,16 @@ def process_record_file(record_file: RecordFile) -> None:
if match["ns"] == "pronom": if match["ns"] == "pronom":
format = Format.from_sf_dict(match) format = Format.from_sf_dict(match)
# replace first occurrence of the URI with filename
filename = file_info["filename"].replace(
record_file.uri, record_file.filename, 1
)
# the storing of results needs to be mutually exclusive # the storing of results needs to be mutually exclusive
with mutex: with mutex:
format = formats.setdefault(format.puid, format) format = formats.setdefault(format.puid, format)
result = Result( result = Result(
filename=file_info["filename"], filename=filename,
record=record_file.record, record=record_file.record,
format=format, format=format,
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment