summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2014-08-29 01:54:13 +0300
committerKai Huuhko <kai.huuhko@gmail.com>2014-08-29 01:54:13 +0300
commit3cae5d3c685ff1e661f971ff207a0c880d2ee18c (patch)
tree0badc78e751cecaaa3de6bc80e35d1be1ba3c5d2
parent1ca57a6afcdbf999068079c2b488c4bf3ac01c60 (diff)
Fix opus codec error path
-rwxr-xr-xvalosoitin/Valosoitin.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/valosoitin/Valosoitin.py b/valosoitin/Valosoitin.py
index 3951e26..735bcc2 100755
--- a/valosoitin/Valosoitin.py
+++ b/valosoitin/Valosoitin.py
@@ -41,7 +41,6 @@ random.seed()
41 41
42import mimetypes 42import mimetypes
43mimetypes.init() 43mimetypes.init()
44mimetypes.add_type("audio/opus", ".opus", strict=True)
45 44
46import logging 45import logging
47logging.basicConfig(level=logging.DEBUG) 46logging.basicConfig(level=logging.DEBUG)
@@ -57,6 +56,12 @@ import mutagen.mp3
57import mutagen.id3 56import mutagen.id3
58import mutagen.flac 57import mutagen.flac
59import mutagen.oggvorbis 58import mutagen.oggvorbis
59try:
60 import mutagen.oggopus
61except ImportError:
62 log.warn("Opus audio codec support not found")
63else:
64 mimetypes.add_type("audio/opus", ".opus", strict=True)
60 65
61import elementary as elm 66import elementary as elm
62from ecore import Timer, Idler 67from ecore import Timer, Idler