Fix #157: Can now import and play flac files

If you ever need an empty flac file with metadata again:

1. Get a flac file (like https://archive.org/download/NineInchNailsTheSlip24bit96khz/01999999.flac)
2. Tag it with Musicbrainz Picard
3. Truncate it, keeping only tags with `ffmpeg -i in.flac -ss 0 -to 0.001 out.flac`

Thanks @HgO for the trick!
This commit is contained in:
Eliot Berriot 2018-05-12 12:06:14 +02:00
parent 2f44dd0eb7
commit ce92747d89
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
6 changed files with 60 additions and 2 deletions

View file

@ -66,6 +66,7 @@ def compute_status(jobs):
AUDIO_EXTENSIONS_AND_MIMETYPE = [
('ogg', 'audio/ogg'),
('mp3', 'audio/mpeg'),
('flac', 'audio/flac'),
]
EXTENSION_TO_MIMETYPE = {ext: mt for ext, mt in AUDIO_EXTENSIONS_AND_MIMETYPE}