Skip to content

Commit 01a7e2c

Browse files
committed
* Fixing #654 Failed to import attachment due to bad mime type gathering (thanks to larsk2)
1 parent a27c355 commit 01a7e2c

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

CHANGES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## Version 5.12.1
4+
5+
* Fixing #654 Failed to import attachment due to bad mime type gathering (thanks to larsk2)
6+
37
## Version 5.12.0
48

59
* Adding automatic downloads for rigaya encoders on Windows

fastflix/encoders/common/attachments.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
from fastflix.shared import clean_file_string
66

77

8-
def image_type(file: Path):
8+
def image_type(file: Path | str):
99
mime_type = "image/jpeg"
1010
ext_type = "jpg"
11-
if file.name.lower().endswith("png"):
11+
if Path(file).suffix == "png":
1212
mime_type = "image/png"
1313
ext_type = "png"
1414
return mime_type, ext_type

fastflix/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3-
__version__ = "5.12.0"
3+
__version__ = "5.12.1"
44
__author__ = "Chris Griffith"

0 commit comments

Comments
 (0)