Commit caaa50be authored by Thomas Bernhart's avatar Thomas Bernhart
Browse files

Revert back to original identifiert for naming media files

parent be1e51cd
......@@ -128,7 +128,7 @@ def media_export(record_set_path, datastreamstore_path, http_files_path, rtmp_fi
logger.debug("Exporting media files for file: '" + foxml_path + "'")
foxml_reader = FoxmlReader(foxml_path)
document_id = foxml_reader.get_main_identifier()
original_document_id = foxml_reader.get_original_identifier()
media_file_searcher = MediaFileSearcher(foxml_reader, datastreamstore_path, http_files_path, rtmp_files_path,
_parse_sitemap(sitemap_file))
......@@ -136,13 +136,13 @@ def media_export(record_set_path, datastreamstore_path, http_files_path, rtmp_fi
accesscopy_file = media_file_searcher.search_media_file()
if accesscopy_file is not None:
_copy_file(accesscopy_file[0], path.join(record_set_path, "media"),
_normalize_document_id(document_id) + _normalize_file_extension(accesscopy_file[1]), logger)
_normalize_document_id(original_document_id) + _normalize_file_extension(accesscopy_file[1]), logger)
# only export thumbnail if accesscopy_file does not exist or is not an image file:
if _should_export_thumbnail(accesscopy_file):
thumbnail_file = media_file_searcher.search_thumbnail_file()
if thumbnail_file is not None:
_copy_file(thumbnail_file[0], path.join(record_set_path, "thumbnails"),
_normalize_document_id(document_id) + _normalize_file_extension(thumbnail_file[1]), logger)
_normalize_document_id(original_document_id) + _normalize_file_extension(thumbnail_file[1]), logger)
print("Finished media export for '" + record_set_path + "'")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment