Commit 41209cea authored by Thomas Bernhart's avatar Thomas Bernhart
Browse files

Only export thumbnails for audio files

parent 3ab92007
......@@ -30,20 +30,18 @@ def _normalize_file_extension(original_file_name):
return ext.lower()
def _is_image_file(file_name):
image_file_extensions = [
".jpeg",
".jpg",
".png"
def _is_audio_file(file_name):
audio_file_extensions = [
".mp3"
]
normalized_file_ext = _normalize_file_extension(file_name)
return normalized_file_ext in image_file_extensions
return normalized_file_ext in audio_file_extensions
def _should_export_thumbnail(accesscopy_file):
# only export thumbnail if accesscopy_file does not exist or is not an image file:
return accesscopy_file is None or (accesscopy_file is not None and not _is_image_file(accesscopy_file[1]))
return accesscopy_file is None or (accesscopy_file is not None and not _is_audio_file(accesscopy_file[1]))
def _create_logger(name, logfile):
......
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