summaryrefslogtreecommitdiff
path: root/libmat/strippers.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmat/strippers.py')
-rw-r--r--libmat/strippers.py18
1 files changed, 7 insertions, 11 deletions
diff --git a/libmat/strippers.py b/libmat/strippers.py
index 3aca04f..5920c41 100644
--- a/libmat/strippers.py
+++ b/libmat/strippers.py
@@ -2,8 +2,7 @@
2""" 2"""
3 3
4import archive 4import archive
5import audio 5import mutagenstripper
6import images
7import logging 6import logging
8import mat 7import mat
9import misc 8import misc
@@ -15,7 +14,6 @@ STRIPPERS = {
15 'application/x-bzip2': archive.Bzip2Stripper, 14 'application/x-bzip2': archive.Bzip2Stripper,
16 'application/x-gzip': archive.GzipStripper, 15 'application/x-gzip': archive.GzipStripper,
17 'application/zip': archive.ZipStripper, 16 'application/zip': archive.ZipStripper,
18 'audio/mpeg': audio.MpegAudioStripper,
19 'application/x-bittorrent': misc.TorrentStripper, 17 'application/x-bittorrent': misc.TorrentStripper,
20 'application/torrent': misc.TorrentStripper, 18 'application/torrent': misc.TorrentStripper,
21 'application/opendocument': office.OpenDocumentStripper, 19 'application/opendocument': office.OpenDocumentStripper,
@@ -52,11 +50,11 @@ if pdfSupport:
52# audio format support with mutagen-python 50# audio format support with mutagen-python
53try: 51try:
54 import mutagen 52 import mutagen
55 STRIPPERS['audio/x-flac'] = audio.FlacStripper 53 STRIPPERS['audio/x-flac'] = mutagenstripper.FlacStripper
56 STRIPPERS['audio/flac'] = audio.FlacStripper 54 STRIPPERS['audio/flac'] = mutagenstripper.FlacStripper
57 STRIPPERS['audio/vorbis'] = audio.OggStripper 55 STRIPPERS['audio/vorbis'] = mutagenstripper.OggStripper
58 STRIPPERS['audio/ogg'] = audio.OggStripper 56 STRIPPERS['audio/ogg'] = mutagenstripper.OggStripper
59 STRIPPERS['audio/mpeg'] = audio.MpegAudioStripper 57 STRIPPERS['audio/mpeg'] = mutagenstripper.MpegAudioStripper
60except ImportError: 58except ImportError:
61 logging.info('Unable to import python-mutagen: limited audio format support') 59 logging.info('Unable to import python-mutagen: limited audio format support')
62 60
@@ -67,7 +65,5 @@ try:
67 STRIPPERS['image/jpeg'] = exiftool.JpegStripper 65 STRIPPERS['image/jpeg'] = exiftool.JpegStripper
68 STRIPPERS['image/png'] = exiftool.PngStripper 66 STRIPPERS['image/png'] = exiftool.PngStripper
69 STRIPPERS['image/tiff'] = exiftool.TiffStripper 67 STRIPPERS['image/tiff'] = exiftool.TiffStripper
70except OSError: # if exiftool is not installed, use hachoir instead 68except OSError:
71 logging.info('Unable to find exiftool: limited images support') 69 logging.info('Unable to find exiftool: limited images support')
72 STRIPPERS['image/jpeg'] = images.JpegStripper
73 STRIPPERS['image/png'] = images.PngStripper