Check that media file exists

This commit is contained in:
bashrc committed 2021-03-06 23:03:14 +00:00
1 parent 2e552bb17c
commit e9d49c91b0
1 file changed
+4
+4
View File
@@ -54,6 +54,10 @@ def removeMetaData(imageFilename: str, outputFilename: str) -> None:
def _isMedia(imageFilename: str) -> bool:
"""Is the given file a media file?
"""
if not os.path.isfile(_isMedia):
return False
permittedMedia = getMediaExtensions()
for m in permittedMedia:
if imageFilename.endswith('.' + m):