Adding big list of mime types, and adding support for contenty-type in

getMusicDirectory.view
This commit is contained in:
Deluan
2016-03-03 13:43:57 -05:00
parent cd0fa5739b
commit 053f4b72ba
2 changed files with 46 additions and 0 deletions
+2
View File
@@ -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
}