Skip to content
This repository was archived by the owner on Nov 29, 2022. It is now read-only.

Commit 391d980

Browse files
author
multiSnow
committed
update mimetypes from constants
1 parent 078aea1 commit 391d980

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

mcomix/mcomix/constants.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,7 @@
136136
('.pdf','application/pdf'),
137137
)
138138

139+
ARCHIVE_FORMATS = ZIP_FORMATS + RAR_FORMATS + TAR_FORMATS
140+
ARCHIVE_FORMATS += SZIP_FORMATS + LHA_FORMATS + PDF_FORMATS
141+
139142
# vim: expandtab:sw=4:ts=4

mcomix/mcomix/mimetypes.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
import mimetypes
22

3-
# not registered in mimetypes
4-
additional_types=(
5-
('.cb7','application/x-cb7'),
6-
('.cbr','application/x-cbr'),
7-
('.rar','application/x-rar'),
8-
('.cbt','application/x-cbt'),
9-
('.cbz','application/x-cbz'),
10-
)
3+
from mcomix import constants
114

125
if not mimetypes.inited:
136
mimetypes.init()
14-
15-
for suffix,mime in additional_types:
7+
for suffix,mime in constants.ARCHIVE_FORMATS:
168
if suffix not in mimetypes.types_map:
179
mimetypes.add_type(mime,suffix)
1810

0 commit comments

Comments
 (0)