animetosho2mks: Force font/sfnt as mime type

master
Simon Bruder 2021-05-07 22:03:02 +02:00
parent 3b5459b2b2
commit 1d2bf8c88a
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
1 changed files with 1 additions and 5 deletions

View File

@ -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),
]