animetosho2mks: Force font/sfnt as mime type
This commit is contained in:
parent
3b5459b2b2
commit
1d2bf8c88a
|
@ -3,7 +3,6 @@
|
|||
from subprocess import run
|
||||
from tqdm import tqdm
|
||||
import glob
|
||||
import mimetypes
|
||||
import os.path
|
||||
|
||||
|
||||
|
@ -26,9 +25,6 @@ class SubtitleTrack:
|
|||
class Attachment:
|
||||
def __init__(self, filename):
|
||||
self.filename = filename
|
||||
self.mimetype = mimetypes.guess_type(self.filename)[0]
|
||||
if self.mimetype is None:
|
||||
raise Exception(f"Cannot guess mimetype of attachment {self.mimetype}")
|
||||
|
||||
|
||||
class AnimeToshoFile:
|
||||
|
@ -64,7 +60,7 @@ class AnimeToshoFile:
|
|||
command.extend(
|
||||
[
|
||||
"--attachment-mime-type",
|
||||
attachment.mimetype,
|
||||
"font/sfnt",
|
||||
"--attach-file",
|
||||
os.path.join(self.base, "attachments", attachment.filename),
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue