1
0
Fork 0
mirror of https://github.com/marty-oehme/scripts.git synced 2024-11-14 13:58:07 +00:00

Merge pull request #35 from martokk/patch-1

adding support for .jpeg images
This commit is contained in:
Patrizio Bekerle 2018-07-17 15:41:28 +02:00 committed by GitHub
commit 8e19725c92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -103,7 +103,7 @@ class File:
if self.ext == '.pdf':
self.type = 'pdf'
elif self.ext in ('.jpg', '.png', '.gif'):
elif self.ext in ('.jpg', '.jpeg', '.png', '.gif'):
self.type = 'image'
else:
self.type = 'other'
@ -200,4 +200,4 @@ class File:
return '![](file://{})'.format('media/fileicons/' + os.path.basename(self.icon)) + ' ' + \
'[{}](file://{})'.format(self.title, link_path)
else:
return '[{}](file://{})'.format(self.title, link_path)
return '[{}](file://{})'.format(self.title, link_path)