mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-20 00:58:41 +01:00
Adding big list of mime types, and adding support for contenty-type in
getMusicDirectory.view
This commit is contained in:
parent
cd0fa5739b
commit
053f4b72ba
2 changed files with 46 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ import (
|
|||
"github.com/deluan/gosonic/domain"
|
||||
"github.com/deluan/gosonic/utils"
|
||||
"github.com/karlkfi/inject"
|
||||
"mime"
|
||||
)
|
||||
|
||||
type GetMusicDirectoryController struct {
|
||||
|
|
@ -82,6 +83,7 @@ func (c *GetMusicDirectoryController) buildAlbumDir(al *domain.Album, tracks []d
|
|||
if mf.HasCoverArt {
|
||||
dir.Child[i].CoverArt = mf.Id
|
||||
}
|
||||
dir.Child[i].ContentType = mime.TypeByExtension("." + mf.Suffix)
|
||||
}
|
||||
return dir
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue