From 1d2bf8c88afd6e47fe598b0cd970d797fcba8f07 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Fri, 7 May 2021 22:03:02 +0200 Subject: [PATCH] animetosho2mks: Force font/sfnt as mime type --- animetosho2mks.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/animetosho2mks.py b/animetosho2mks.py index a42916d..7e33d04 100755 --- a/animetosho2mks.py +++ b/animetosho2mks.py @@ -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), ]