[feature] add flac support (#3121)

* add flac support to the ffprobe format/stream -> filetype parser

* also add audio/flac for flac (not just x-flac)

* update tests

---------

Co-authored-by: tobi <tobi.smethurst@protonmail.com>
This commit is contained in:
kim 2024-07-21 13:42:51 +01:00 committed by GitHub
commit c635080a0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 21 additions and 0 deletions

View file

@ -335,6 +335,8 @@ func (res *result) GetFileType() (gtsmodel.FileType, string) {
}
case "avi":
return gtsmodel.FileTypeVideo, "avi"
case "flac":
return gtsmodel.FileTypeAudio, "flac"
}
return gtsmodel.FileTypeUnknown, res.format
}

View file

@ -43,6 +43,9 @@ var SupportedMIMETypes = []string{
"video/x-msvideo", // .avi
"audio/flac", // .flac
"audio/x-flac", // .flac
// png types
"image/png", // .png
"image/apng", // .apng