mirror of
https://github.com/Huluti/Curtail.git
synced 2024-09-11 14:16:12 +03:00
Fix #189
This commit is contained in:
parent
89f98cf92a
commit
0d1c98837d
@ -62,8 +62,7 @@ def add_filechooser_filters(dialog):
|
||||
|
||||
|
||||
def get_file_type(filename):
|
||||
content_type, uncertain = Gio.content_type_guess(filename=str(filename))
|
||||
if not uncertain:
|
||||
content_type = Gio.content_type_guess(filename=str(filename))[0]
|
||||
if content_type == 'image/jpeg':
|
||||
return 'jpg'
|
||||
elif content_type == 'image/png':
|
||||
@ -74,8 +73,6 @@ def get_file_type(filename):
|
||||
return 'svg'
|
||||
else:
|
||||
return None
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def create_image_from_file(filename, max_width, max_height):
|
||||
|
Loading…
Reference in New Issue
Block a user