mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-25 16:02:17 +03:00
Outputting a track object with metadata, we should use the trackid in the ID rather
than the title
This commit is contained in:
parent
e8301cf864
commit
8c89957826
@ -192,7 +192,8 @@ func (cds *contentDirectoryService) readContainer(o object, host string) (ret []
|
||||
fmt.Printf("Error retrieving tracks for artist and genre: %+v", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return cds.doMediaFiles(tracks, o.Path, ret, host)
|
||||
/*
|
||||
//TODO do the metadata and stuff here
|
||||
for trackIndex := range tracks {
|
||||
child := object {
|
||||
@ -200,7 +201,7 @@ func (cds *contentDirectoryService) readContainer(o object, host string) (ret []
|
||||
Id: path.Join(o.Path, tracks[trackIndex].ID),
|
||||
}
|
||||
ret = append(ret, cds.cdsObjectToUpnpavObject(child, false, host))
|
||||
}
|
||||
}*/
|
||||
} else if matchResults["Genre"] != "" {
|
||||
if matchResults["GenreArtist"] == "" {
|
||||
artists, err := cds.ds.Artist(cds.ctx).GetAll(model.QueryOptions{Filters: squirrel.Eq{ "genre.id": matchResults["Genre"]}})
|
||||
@ -281,7 +282,7 @@ func (cds *contentDirectoryService) doMediaFiles(tracks model.MediaFiles, basePa
|
||||
*/
|
||||
for _, track := range tracks {
|
||||
child := object{
|
||||
Path: path.Join(basePath, track.Title),
|
||||
Path: path.Join(basePath, track.ID),
|
||||
Id: path.Join(basePath, track.ID),
|
||||
}
|
||||
title := track.Title
|
||||
|
Loading…
x
Reference in New Issue
Block a user