navidrome/consts/mime_types.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
746 B
Go
Raw Permalink Normal View History

2020-02-05 02:44:54 +01:00
package consts
import "mime"
2020-02-05 02:44:54 +01:00
func init() {
mt := map[string]string{
".mp3": "audio/mpeg",
".ogg": "audio/ogg",
".oga": "audio/ogg",
".opus": "audio/ogg",
".aac": "audio/mp4",
".m4a": "audio/mp4",
".m4b": "audio/mp4",
".flac": "audio/flac",
".wav": "audio/x-wav",
".wma": "audio/x-ms-wma",
".ape": "audio/x-monkeys-audio",
".mpc": "audio/x-musepack",
".shn": "audio/x-shn",
".aif": "audio/x-aiff",
".aiff": "audio/x-aiff",
2020-07-04 03:15:01 +02:00
".m3u": "audio/x-mpegurl",
".pls": "audio/x-scpls",
2020-07-06 18:25:55 +02:00
".dsf": "audio/dsd",
".gif": "image/gif",
".jpg": "image/jpeg",
".jpeg": "image/jpeg",
".png": "image/png",
".bmp": "image/bmp",
}
for ext, typ := range mt {
2020-01-08 16:25:23 +01:00
_ = mime.AddExtensionType(ext, typ)
}
}