show transcode meta info in more places
This commit is contained in:
@@ -96,7 +96,7 @@ func (c *Controller) ServeGetMusicDirectory(r *http.Request) *spec.Response {
|
|||||||
Order("filename").
|
Order("filename").
|
||||||
Find(&childTracks)
|
Find(&childTracks)
|
||||||
|
|
||||||
transcodeMIME, transcodeSuffix := streamGetTransPrefProfile(c.DB, user.ID, params.GetOr("c", ""))
|
transcodeMeta := streamGetTranscodeMeta(c.DB, user.ID, params.GetOr("c", ""))
|
||||||
|
|
||||||
for _, ch := range childTracks {
|
for _, ch := range childTracks {
|
||||||
toAppend := spec.NewTCTrackByFolder(ch, folder)
|
toAppend := spec.NewTCTrackByFolder(ch, folder)
|
||||||
@@ -105,8 +105,7 @@ func (c *Controller) ServeGetMusicDirectory(r *http.Request) *spec.Response {
|
|||||||
toAppend.ContentType = "audio/mpeg"
|
toAppend.ContentType = "audio/mpeg"
|
||||||
toAppend.Suffix = "mp3"
|
toAppend.Suffix = "mp3"
|
||||||
}
|
}
|
||||||
toAppend.TranscodedContentType = transcodeMIME
|
toAppend.TranscodeMeta = transcodeMeta
|
||||||
toAppend.TranscodedSuffix = transcodeSuffix
|
|
||||||
childrenObj = append(childrenObj, toAppend)
|
childrenObj = append(childrenObj, toAppend)
|
||||||
}
|
}
|
||||||
// respond section
|
// respond section
|
||||||
@@ -270,12 +269,11 @@ func (c *Controller) ServeSearchTwo(r *http.Request) *spec.Response {
|
|||||||
return spec.NewError(0, "find tracks: %v", err)
|
return spec.NewError(0, "find tracks: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
transcodeMIME, transcodeSuffix := streamGetTransPrefProfile(c.DB, user.ID, params.GetOr("c", ""))
|
transcodeMeta := streamGetTranscodeMeta(c.DB, user.ID, params.GetOr("c", ""))
|
||||||
|
|
||||||
for _, t := range tracks {
|
for _, t := range tracks {
|
||||||
track := spec.NewTCTrackByFolder(t, t.Album)
|
track := spec.NewTCTrackByFolder(t, t.Album)
|
||||||
track.TranscodedContentType = transcodeMIME
|
track.TranscodeMeta = transcodeMeta
|
||||||
track.TranscodedSuffix = transcodeSuffix
|
|
||||||
results.Tracks = append(results.Tracks, track)
|
results.Tracks = append(results.Tracks, track)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -352,12 +350,11 @@ func (c *Controller) ServeGetStarred(r *http.Request) *spec.Response {
|
|||||||
return spec.NewError(0, "find tracks: %v", err)
|
return spec.NewError(0, "find tracks: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
transcodeMIME, transcodeSuffix := streamGetTransPrefProfile(c.DB, user.ID, params.GetOr("c", ""))
|
transcodeMeta := streamGetTranscodeMeta(c.DB, user.ID, params.GetOr("c", ""))
|
||||||
|
|
||||||
for _, t := range tracks {
|
for _, t := range tracks {
|
||||||
track := spec.NewTCTrackByFolder(t, t.Album)
|
track := spec.NewTCTrackByFolder(t, t.Album)
|
||||||
track.TranscodedContentType = transcodeMIME
|
track.TranscodeMeta = transcodeMeta
|
||||||
track.TranscodedSuffix = transcodeSuffix
|
|
||||||
results.Tracks = append(results.Tracks, track)
|
results.Tracks = append(results.Tracks, track)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -120,12 +120,11 @@ func (c *Controller) ServeGetAlbum(r *http.Request) *spec.Response {
|
|||||||
sub.Album = spec.NewAlbumByTags(album, album.Artists)
|
sub.Album = spec.NewAlbumByTags(album, album.Artists)
|
||||||
sub.Album.Tracks = make([]*spec.TrackChild, len(album.Tracks))
|
sub.Album.Tracks = make([]*spec.TrackChild, len(album.Tracks))
|
||||||
|
|
||||||
transcodeMIME, transcodeSuffix := streamGetTransPrefProfile(c.DB, user.ID, params.GetOr("c", ""))
|
transcodeMeta := streamGetTranscodeMeta(c.DB, user.ID, params.GetOr("c", ""))
|
||||||
|
|
||||||
for i, track := range album.Tracks {
|
for i, track := range album.Tracks {
|
||||||
sub.Album.Tracks[i] = spec.NewTrackByTags(track, album)
|
sub.Album.Tracks[i] = spec.NewTrackByTags(track, album)
|
||||||
sub.Album.Tracks[i].TranscodedContentType = transcodeMIME
|
sub.Album.Tracks[i].TranscodeMeta = transcodeMeta
|
||||||
sub.Album.Tracks[i].TranscodedSuffix = transcodeSuffix
|
|
||||||
}
|
}
|
||||||
return sub
|
return sub
|
||||||
}
|
}
|
||||||
@@ -288,12 +287,11 @@ func (c *Controller) ServeSearchThree(r *http.Request) *spec.Response {
|
|||||||
return spec.NewError(0, "find tracks: %v", err)
|
return spec.NewError(0, "find tracks: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
transcodeMIME, transcodeSuffix := streamGetTransPrefProfile(c.DB, user.ID, params.GetOr("c", ""))
|
transcodeMeta := streamGetTranscodeMeta(c.DB, user.ID, params.GetOr("c", ""))
|
||||||
|
|
||||||
for _, t := range tracks {
|
for _, t := range tracks {
|
||||||
track := spec.NewTrackByTags(t, t.Album)
|
track := spec.NewTrackByTags(t, t.Album)
|
||||||
track.TranscodedContentType = transcodeMIME
|
track.TranscodeMeta = transcodeMeta
|
||||||
track.TranscodedSuffix = transcodeSuffix
|
|
||||||
results.Tracks = append(results.Tracks, track)
|
results.Tracks = append(results.Tracks, track)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -430,12 +428,11 @@ func (c *Controller) ServeGetSongsByGenre(r *http.Request) *spec.Response {
|
|||||||
List: make([]*spec.TrackChild, len(tracks)),
|
List: make([]*spec.TrackChild, len(tracks)),
|
||||||
}
|
}
|
||||||
|
|
||||||
transcodeMIME, transcodeSuffix := streamGetTransPrefProfile(c.DB, user.ID, params.GetOr("c", ""))
|
transcodeMeta := streamGetTranscodeMeta(c.DB, user.ID, params.GetOr("c", ""))
|
||||||
|
|
||||||
for i, t := range tracks {
|
for i, t := range tracks {
|
||||||
sub.TracksByGenre.List[i] = spec.NewTrackByTags(t, t.Album)
|
sub.TracksByGenre.List[i] = spec.NewTrackByTags(t, t.Album)
|
||||||
sub.TracksByGenre.List[i].TranscodedContentType = transcodeMIME
|
sub.TracksByGenre.List[i].TranscodeMeta = transcodeMeta
|
||||||
sub.TracksByGenre.List[i].TranscodedSuffix = transcodeSuffix
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return sub
|
return sub
|
||||||
@@ -503,12 +500,11 @@ func (c *Controller) ServeGetStarredTwo(r *http.Request) *spec.Response {
|
|||||||
return spec.NewError(0, "find tracks: %v", err)
|
return spec.NewError(0, "find tracks: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
transcodeMIME, transcodeSuffix := streamGetTransPrefProfile(c.DB, user.ID, params.GetOr("c", ""))
|
transcodeMeta := streamGetTranscodeMeta(c.DB, user.ID, params.GetOr("c", ""))
|
||||||
|
|
||||||
for _, t := range tracks {
|
for _, t := range tracks {
|
||||||
track := spec.NewTrackByTags(t, t.Album)
|
track := spec.NewTrackByTags(t, t.Album)
|
||||||
track.TranscodedContentType = transcodeMIME
|
track.TranscodeMeta = transcodeMeta
|
||||||
track.TranscodedSuffix = transcodeSuffix
|
|
||||||
results.Tracks = append(results.Tracks, track)
|
results.Tracks = append(results.Tracks, track)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -580,12 +576,11 @@ func (c *Controller) ServeGetTopSongs(r *http.Request) *spec.Response {
|
|||||||
return sub
|
return sub
|
||||||
}
|
}
|
||||||
|
|
||||||
transcodeMIME, transcodeSuffix := streamGetTransPrefProfile(c.DB, user.ID, params.GetOr("c", ""))
|
transcodeMeta := streamGetTranscodeMeta(c.DB, user.ID, params.GetOr("c", ""))
|
||||||
|
|
||||||
for _, track := range tracks {
|
for _, track := range tracks {
|
||||||
tc := spec.NewTrackByTags(track, track.Album)
|
tc := spec.NewTrackByTags(track, track.Album)
|
||||||
tc.TranscodedContentType = transcodeMIME
|
tc.TranscodeMeta = transcodeMeta
|
||||||
tc.TranscodedSuffix = transcodeSuffix
|
|
||||||
sub.TopSongs.Tracks = append(sub.TopSongs.Tracks, tc)
|
sub.TopSongs.Tracks = append(sub.TopSongs.Tracks, tc)
|
||||||
}
|
}
|
||||||
return sub
|
return sub
|
||||||
@@ -650,12 +645,11 @@ func (c *Controller) ServeGetSimilarSongs(r *http.Request) *spec.Response {
|
|||||||
Tracks: make([]*spec.TrackChild, len(tracks)),
|
Tracks: make([]*spec.TrackChild, len(tracks)),
|
||||||
}
|
}
|
||||||
|
|
||||||
transcodeMIME, transcodeSuffix := streamGetTransPrefProfile(c.DB, user.ID, params.GetOr("c", ""))
|
transcodeMeta := streamGetTranscodeMeta(c.DB, user.ID, params.GetOr("c", ""))
|
||||||
|
|
||||||
for i, track := range tracks {
|
for i, track := range tracks {
|
||||||
sub.SimilarSongs.Tracks[i] = spec.NewTrackByTags(track, track.Album)
|
sub.SimilarSongs.Tracks[i] = spec.NewTrackByTags(track, track.Album)
|
||||||
sub.SimilarSongs.Tracks[i].TranscodedContentType = transcodeMIME
|
sub.SimilarSongs.Tracks[i].TranscodeMeta = transcodeMeta
|
||||||
sub.SimilarSongs.Tracks[i].TranscodedSuffix = transcodeSuffix
|
|
||||||
}
|
}
|
||||||
return sub
|
return sub
|
||||||
}
|
}
|
||||||
@@ -721,12 +715,10 @@ func (c *Controller) ServeGetSimilarSongsTwo(r *http.Request) *spec.Response {
|
|||||||
Tracks: make([]*spec.TrackChild, len(tracks)),
|
Tracks: make([]*spec.TrackChild, len(tracks)),
|
||||||
}
|
}
|
||||||
|
|
||||||
transcodeMIME, transcodeSuffix := streamGetTransPrefProfile(c.DB, user.ID, params.GetOr("c", ""))
|
transcodeMeta := streamGetTranscodeMeta(c.DB, user.ID, params.GetOr("c", ""))
|
||||||
|
|
||||||
for i, track := range tracks {
|
for i, track := range tracks {
|
||||||
sub.SimilarSongsTwo.Tracks[i] = spec.NewTrackByTags(track, track.Album)
|
sub.SimilarSongsTwo.Tracks[i] = spec.NewTrackByTags(track, track.Album)
|
||||||
sub.SimilarSongsTwo.Tracks[i].TranscodedContentType = transcodeMIME
|
sub.SimilarSongsTwo.Tracks[i].TranscodeMeta = transcodeMeta
|
||||||
sub.SimilarSongsTwo.Tracks[i].TranscodedSuffix = transcodeSuffix
|
|
||||||
}
|
}
|
||||||
return sub
|
return sub
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ func (c *Controller) ServeGetPlayQueue(r *http.Request) *spec.Response {
|
|||||||
trackIDs := queue.GetItems()
|
trackIDs := queue.GetItems()
|
||||||
sub.PlayQueue.List = make([]*spec.TrackChild, len(trackIDs))
|
sub.PlayQueue.List = make([]*spec.TrackChild, len(trackIDs))
|
||||||
|
|
||||||
transcodeMIME, transcodeSuffix := streamGetTransPrefProfile(c.DB, user.ID, params.GetOr("c", ""))
|
transcodeMeta := streamGetTranscodeMeta(c.DB, user.ID, params.GetOr("c", ""))
|
||||||
|
|
||||||
for i, id := range trackIDs {
|
for i, id := range trackIDs {
|
||||||
switch id.Type {
|
switch id.Type {
|
||||||
@@ -178,8 +178,7 @@ func (c *Controller) ServeGetPlayQueue(r *http.Request) *spec.Response {
|
|||||||
Preload("TrackRating", "user_id=?", user.ID).
|
Preload("TrackRating", "user_id=?", user.ID).
|
||||||
Find(&track)
|
Find(&track)
|
||||||
sub.PlayQueue.List[i] = spec.NewTCTrackByFolder(&track, track.Album)
|
sub.PlayQueue.List[i] = spec.NewTCTrackByFolder(&track, track.Album)
|
||||||
sub.PlayQueue.List[i].TranscodedContentType = transcodeMIME
|
sub.PlayQueue.List[i].TranscodeMeta = transcodeMeta
|
||||||
sub.PlayQueue.List[i].TranscodedSuffix = transcodeSuffix
|
|
||||||
case specid.PodcastEpisode:
|
case specid.PodcastEpisode:
|
||||||
pe := db.PodcastEpisode{}
|
pe := db.PodcastEpisode{}
|
||||||
c.DB.
|
c.DB.
|
||||||
@@ -190,8 +189,7 @@ func (c *Controller) ServeGetPlayQueue(r *http.Request) *spec.Response {
|
|||||||
Where("id=?", pe.PodcastID).
|
Where("id=?", pe.PodcastID).
|
||||||
Find(&p)
|
Find(&p)
|
||||||
sub.PlayQueue.List[i] = spec.NewTCPodcastEpisode(&pe, &p)
|
sub.PlayQueue.List[i] = spec.NewTCPodcastEpisode(&pe, &p)
|
||||||
sub.PlayQueue.List[i].TranscodedContentType = transcodeMIME
|
sub.PlayQueue.List[i].TranscodeMeta = transcodeMeta
|
||||||
sub.PlayQueue.List[i].TranscodedSuffix = transcodeSuffix
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sub
|
return sub
|
||||||
@@ -243,8 +241,14 @@ func (c *Controller) ServeGetSong(r *http.Request) *spec.Response {
|
|||||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||||
return spec.NewError(10, "couldn't find a track with that id")
|
return spec.NewError(10, "couldn't find a track with that id")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
transcodeMeta := streamGetTranscodeMeta(c.DB, user.ID, params.GetOr("c", ""))
|
||||||
|
|
||||||
sub := spec.NewResponse()
|
sub := spec.NewResponse()
|
||||||
sub.Track = spec.NewTrackByTags(&track, track.Album)
|
sub.Track = spec.NewTrackByTags(&track, track.Album)
|
||||||
|
|
||||||
|
sub.Track.TranscodeMeta = transcodeMeta
|
||||||
|
|
||||||
return sub
|
return sub
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,12 +284,11 @@ func (c *Controller) ServeGetRandomSongs(r *http.Request) *spec.Response {
|
|||||||
sub.RandomTracks = &spec.RandomTracks{}
|
sub.RandomTracks = &spec.RandomTracks{}
|
||||||
sub.RandomTracks.List = make([]*spec.TrackChild, len(tracks))
|
sub.RandomTracks.List = make([]*spec.TrackChild, len(tracks))
|
||||||
|
|
||||||
transcodeMIME, transcodeSuffix := streamGetTransPrefProfile(c.DB, user.ID, params.GetOr("c", ""))
|
transcodeMeta := streamGetTranscodeMeta(c.DB, user.ID, params.GetOr("c", ""))
|
||||||
|
|
||||||
for i, track := range tracks {
|
for i, track := range tracks {
|
||||||
sub.RandomTracks.List[i] = spec.NewTrackByTags(track, track.Album)
|
sub.RandomTracks.List[i] = spec.NewTrackByTags(track, track.Album)
|
||||||
sub.RandomTracks.List[i].TranscodedContentType = transcodeMIME
|
sub.RandomTracks.List[i].TranscodeMeta = transcodeMeta
|
||||||
sub.RandomTracks.List[i].TranscodedSuffix = transcodeSuffix
|
|
||||||
}
|
}
|
||||||
return sub
|
return sub
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ func playlistRender(c *Controller, params params.Params, playlistID string, play
|
|||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
transcodeMIME, transcodeSuffix := streamGetTransPrefProfile(c.DB, user.ID, params.GetOr("c", ""))
|
transcodeMeta := streamGetTranscodeMeta(c.DB, user.ID, params.GetOr("c", ""))
|
||||||
|
|
||||||
for _, path := range playlist.Items {
|
for _, path := range playlist.Items {
|
||||||
file, err := specidpaths.Lookup(c.DB, PathsOf(c.MusicPaths), c.PodcastsPath, path)
|
file, err := specidpaths.Lookup(c.DB, PathsOf(c.MusicPaths), c.PodcastsPath, path)
|
||||||
@@ -236,8 +236,7 @@ func playlistRender(c *Controller, params params.Params, playlistID string, play
|
|||||||
default:
|
default:
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
trch.TranscodedContentType = transcodeMIME
|
trch.TranscodeMeta = transcodeMeta
|
||||||
trch.TranscodedSuffix = transcodeSuffix
|
|
||||||
resp.List = append(resp.List, trch)
|
resp.List = append(resp.List, trch)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import (
|
|||||||
// b) return a non-nil spec.Response
|
// b) return a non-nil spec.Response
|
||||||
// _but not both_
|
// _but not both_
|
||||||
|
|
||||||
func streamGetTransPref(dbc *db.DB, userID int, client string) (*db.TranscodePreference, error) {
|
func streamGetTransodePreference(dbc *db.DB, userID int, client string) (*db.TranscodePreference, error) {
|
||||||
var pref db.TranscodePreference
|
var pref db.TranscodePreference
|
||||||
err := dbc.
|
err := dbc.
|
||||||
Where("user_id=?", userID).
|
Where("user_id=?", userID).
|
||||||
@@ -47,16 +47,19 @@ func streamGetTransPref(dbc *db.DB, userID int, client string) (*db.TranscodePre
|
|||||||
return &pref, nil
|
return &pref, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func streamGetTransPrefProfile(dbc *db.DB, userID int, client string) (mime string, suffix string) {
|
func streamGetTranscodeMeta(dbc *db.DB, userID int, client string) spec.TranscodeMeta {
|
||||||
pref, _ := streamGetTransPref(dbc, userID, client)
|
pref, _ := streamGetTransodePreference(dbc, userID, client)
|
||||||
if pref == nil {
|
if pref == nil {
|
||||||
return "", ""
|
return spec.TranscodeMeta{}
|
||||||
}
|
}
|
||||||
profile, ok := transcode.UserProfiles[pref.Profile]
|
profile, ok := transcode.UserProfiles[pref.Profile]
|
||||||
if !ok {
|
if !ok {
|
||||||
return "", ""
|
return spec.TranscodeMeta{}
|
||||||
|
}
|
||||||
|
return spec.TranscodeMeta{
|
||||||
|
TranscodedContentType: profile.MIME(),
|
||||||
|
TranscodedSuffix: profile.Suffix(),
|
||||||
}
|
}
|
||||||
return profile.MIME(), profile.Suffix()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var errUnknownMediaType = fmt.Errorf("media type is unknown")
|
var errUnknownMediaType = fmt.Errorf("media type is unknown")
|
||||||
@@ -287,7 +290,7 @@ func (c *Controller) ServeStream(w http.ResponseWriter, r *http.Request) *spec.R
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
pref, err := streamGetTransPref(c.DB, user.ID, params.GetOr("c", ""))
|
pref, err := streamGetTransodePreference(c.DB, user.ID, params.GetOr("c", ""))
|
||||||
if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
|
if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
|
||||||
return spec.NewError(0, "couldn't find transcode preference: %v", err)
|
return spec.NewError(0, "couldn't find transcode preference: %v", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,6 +151,11 @@ type TracksByGenre struct {
|
|||||||
List []*TrackChild `xml:"song" json:"song"`
|
List []*TrackChild `xml:"song" json:"song"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type TranscodeMeta struct {
|
||||||
|
TranscodedContentType string `xml:"transcodedContentType,attr,omitempty" json:"transcodedContentType,omitempty"`
|
||||||
|
TranscodedSuffix string `xml:"transcodedSuffix,attr,omitempty" json:"transcodedSuffix,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
type TrackChild struct {
|
type TrackChild struct {
|
||||||
ID *specid.ID `xml:"id,attr,omitempty" json:"id,omitempty"`
|
ID *specid.ID `xml:"id,attr,omitempty" json:"id,omitempty"`
|
||||||
Album string `xml:"album,attr,omitempty" json:"album,omitempty"`
|
Album string `xml:"album,attr,omitempty" json:"album,omitempty"`
|
||||||
@@ -159,7 +164,6 @@ type TrackChild struct {
|
|||||||
ArtistID *specid.ID `xml:"artistId,attr,omitempty" json:"artistId,omitempty"`
|
ArtistID *specid.ID `xml:"artistId,attr,omitempty" json:"artistId,omitempty"`
|
||||||
Bitrate int `xml:"bitRate,attr,omitempty" json:"bitRate,omitempty"`
|
Bitrate int `xml:"bitRate,attr,omitempty" json:"bitRate,omitempty"`
|
||||||
ContentType string `xml:"contentType,attr,omitempty" json:"contentType,omitempty"`
|
ContentType string `xml:"contentType,attr,omitempty" json:"contentType,omitempty"`
|
||||||
TranscodedContentType string `xml:"transcodedContentType,attr,omitempty" json:"transcodedContentType,omitempty"`
|
|
||||||
CoverID *specid.ID `xml:"coverArt,attr,omitempty" json:"coverArt,omitempty"`
|
CoverID *specid.ID `xml:"coverArt,attr,omitempty" json:"coverArt,omitempty"`
|
||||||
CreatedAt time.Time `xml:"created,attr,omitempty" json:"created,omitempty"`
|
CreatedAt time.Time `xml:"created,attr,omitempty" json:"created,omitempty"`
|
||||||
Duration int `xml:"duration,attr,omitempty" json:"duration,omitempty"`
|
Duration int `xml:"duration,attr,omitempty" json:"duration,omitempty"`
|
||||||
@@ -170,7 +174,6 @@ type TrackChild struct {
|
|||||||
Path string `xml:"path,attr,omitempty" json:"path,omitempty"`
|
Path string `xml:"path,attr,omitempty" json:"path,omitempty"`
|
||||||
Size int `xml:"size,attr,omitempty" json:"size,omitempty"`
|
Size int `xml:"size,attr,omitempty" json:"size,omitempty"`
|
||||||
Suffix string `xml:"suffix,attr,omitempty" json:"suffix,omitempty"`
|
Suffix string `xml:"suffix,attr,omitempty" json:"suffix,omitempty"`
|
||||||
TranscodedSuffix string `xml:"transcodedSuffix,attr,omitempty" json:"transcodedSuffix,omitempty"`
|
|
||||||
Title string `xml:"title,attr" json:"title"`
|
Title string `xml:"title,attr" json:"title"`
|
||||||
TrackNumber int `xml:"track,attr,omitempty" json:"track,omitempty"`
|
TrackNumber int `xml:"track,attr,omitempty" json:"track,omitempty"`
|
||||||
DiscNumber int `xml:"discNumber,attr,omitempty" json:"discNumber,omitempty"`
|
DiscNumber int `xml:"discNumber,attr,omitempty" json:"discNumber,omitempty"`
|
||||||
@@ -180,6 +183,8 @@ type TrackChild struct {
|
|||||||
Starred *time.Time `xml:"starred,attr,omitempty" json:"starred,omitempty"`
|
Starred *time.Time `xml:"starred,attr,omitempty" json:"starred,omitempty"`
|
||||||
UserRating int `xml:"userRating,attr,omitempty" json:"userRating,omitempty"`
|
UserRating int `xml:"userRating,attr,omitempty" json:"userRating,omitempty"`
|
||||||
AverageRating string `xml:"averageRating,attr,omitempty" json:"averageRating,omitempty"`
|
AverageRating string `xml:"averageRating,attr,omitempty" json:"averageRating,omitempty"`
|
||||||
|
|
||||||
|
TranscodeMeta
|
||||||
}
|
}
|
||||||
|
|
||||||
type Artists struct {
|
type Artists struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user