Remove python-magic
This commit is contained in:
parent
f98dabcc02
commit
f2ce77fecb
|
@ -1,7 +1,6 @@
|
||||||
import time
|
import time
|
||||||
import datetime
|
import datetime
|
||||||
import mutagen
|
import mutagen
|
||||||
import magic # For MIME type detection
|
|
||||||
from analyzer import Analyzer
|
from analyzer import Analyzer
|
||||||
|
|
||||||
class MetadataAnalyzer(Analyzer):
|
class MetadataAnalyzer(Analyzer):
|
||||||
|
@ -45,12 +44,9 @@ class MetadataAnalyzer(Analyzer):
|
||||||
# Other fields for Airtime
|
# Other fields for Airtime
|
||||||
metadata["cueout"] = metadata["length"]
|
metadata["cueout"] = metadata["length"]
|
||||||
|
|
||||||
#Use the python-magic module to get the MIME type.
|
#Use the mutagen to get the MIME type.
|
||||||
if audio_file.mime:
|
if audio_file.mime:
|
||||||
metadata["mime"] = audio_file.mime[0]
|
metadata["mime"] = audio_file.mime[0]
|
||||||
else:
|
|
||||||
mime_magic = magic.Magic(mime=True)
|
|
||||||
metadata["mime"] = mime_magic.from_file(filename)
|
|
||||||
|
|
||||||
#Try to get the number of channels if mutagen can...
|
#Try to get the number of channels if mutagen can...
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -22,7 +22,6 @@ setup(name='airtime_analyzer',
|
||||||
scripts=['bin/airtime_analyzer'],
|
scripts=['bin/airtime_analyzer'],
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'mutagen',
|
'mutagen',
|
||||||
'python-magic',
|
|
||||||
'pika',
|
'pika',
|
||||||
'nose',
|
'nose',
|
||||||
'coverage',
|
'coverage',
|
||||||
|
|
Loading…
Reference in New Issue