docs(api): document intentional audioContentType divergence from subsonic
This commit is contained in:
@@ -57,6 +57,12 @@ func resolveAlbumCoverPath(ctx context.Context, q *dbq.Queries, album dbq.Album)
|
||||
// ogg, opus, m4a, aac, wav) to a MIME type for the Content-Type header.
|
||||
// Unknown formats fall back to octet-stream so the browser downloads them
|
||||
// rather than attempting to decode.
|
||||
//
|
||||
// Divergences from internal/subsonic/types.go's contentTypeForFormat are
|
||||
// intentional: opus→audio/ogg (library .opus files are Ogg-encapsulated, so
|
||||
// this matches real library contents), aac→audio/aac (raw AAC is ADTS, not
|
||||
// MP4, so audio/mp4 would mislead codec sniffers), and there is no "oga" case
|
||||
// (we don't record that format). Don't "fix" these to match subsonic.
|
||||
func audioContentType(format string) string {
|
||||
switch strings.ToLower(format) {
|
||||
case "mp3":
|
||||
|
||||
Reference in New Issue
Block a user