Skip to content
Snippets Groups Projects
Commit 2a7bb417 authored by Julien (jvoisin) Voisin's avatar Julien (jvoisin) Voisin
Browse files

Add wav support

parent 693408f1
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ from typing import Dict, Union
import mutagen
from . import abstract, parser_factory
from . import abstract, parser_factory, video
class MutagenParser(abstract.AbstractParser):
......@@ -77,3 +77,12 @@ class FLACParser(MutagenParser):
meta[name] = p.get_meta() if p else 'harmful data' # type: ignore
os.remove(fname)
return meta
class WAVParser(video.AbstractFFmpegParser):
mimetypes = {'audio/x-wav', }
meta_allowlist = {'AvgBytesPerSec', 'BitsPerSample', 'Directory',
'Duration', 'Encoding', 'ExifToolVersion', 'FileAccessDate',
'FileInodeChangeDate', 'FileModifyDate', 'FileName',
'FilePermissions', 'FileSize', 'FileType', 'FileTypeExtension',
'MIMEType', 'NumChannels', 'SampleRate', 'SourceFile', }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment