navidrome/consts/mime_types.go

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

39 lines
831 B
Go
Raw 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",
2020-10-20 16:47:29 +02:00
".wv": "audio/x-wavpack",
".wvp": "audio/x-wavpack",
".gif": "image/gif",
".jpg": "image/jpeg",
".jpeg": "image/jpeg",
2020-08-21 17:33:23 +02:00
".webp": "image/webp",
".png": "image/png",
".bmp": "image/bmp",
}
for ext, typ := range mt {
2020-01-08 16:25:23 +01:00
_ = mime.AddExtensionType(ext, typ)
}
}