Add support for wav files
This commit is contained in:
parent
693408f1a6
commit
ee704db2ff
3 changed files with 22 additions and 1 deletions
|
@ -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,14 @@ 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',
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue