No files matched your search
@@ -80,11 +80,13 @@ func (c *Controller) ServeGetMusicDirectory(r *http.Request) *spec.Response {
|
||||
Where("parent_id=?", id.Value).
|
||||
Preload("AlbumStar", "user_id=?", user.ID).
|
||||
Preload("AlbumRating", "user_id=?", user.ID).
|
||||
Order("tag_year").
|
||||
Order("albums.right_path COLLATE NOCASE").
|
||||
Find(&childFolders)
|
||||
for _, ch := range childFolders {
|
||||
childrenObj = append(childrenObj, spec.NewTCAlbumByFolder(ch))
|
||||
}
|
||||
|
||||
// start looking for child childTracks in the current dir
|
||||
var childTracks []*db.Track
|
||||
c.dbc.
|
||||
@@ -94,6 +96,7 @@ func (c *Controller) ServeGetMusicDirectory(r *http.Request) *spec.Response {
|
||||
Preload("Artists").
|
||||
Preload("TrackStar", "user_id=?", user.ID).
|
||||
Preload("TrackRating", "user_id=?", user.ID).
|
||||
Order("tag_track_number").
|
||||
Order("filename").
|
||||
Find(&childTracks)
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ func NewTCAlbumByFolder(f *db.Album) *TrackChild {
|
||||
ParentID: f.ParentSID(),
|
||||
CreatedAt: f.CreatedAt,
|
||||
AverageRating: formatRating(f.AverageRating),
|
||||
Year: f.TagYear,
|
||||
}
|
||||
if f.AlbumStar != nil {
|
||||
trCh.Starred = &f.AlbumStar.StarDate
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
"isVideo": false,
|
||||
"parent": "al-2",
|
||||
"title": "album-0",
|
||||
"year": 2021,
|
||||
"musicBrainzId": "",
|
||||
"replayGain": null
|
||||
},
|
||||
@@ -39,6 +40,7 @@
|
||||
"isVideo": false,
|
||||
"parent": "al-2",
|
||||
"title": "album-1",
|
||||
"year": 2021,
|
||||
"musicBrainzId": "",
|
||||
"replayGain": null
|
||||
},
|
||||
@@ -55,6 +57,7 @@
|
||||
"isVideo": false,
|
||||
"parent": "al-2",
|
||||
"title": "album-2",
|
||||
"year": 2021,
|
||||
"musicBrainzId": "",
|
||||
"replayGain": null
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"isVideo": false,
|
||||
"parent": "al-2",
|
||||
"title": "album-0",
|
||||
"year": 2021,
|
||||
"musicBrainzId": "",
|
||||
"replayGain": null
|
||||
},
|
||||
@@ -36,6 +37,7 @@
|
||||
"isVideo": false,
|
||||
"parent": "al-2",
|
||||
"title": "album-1",
|
||||
"year": 2021,
|
||||
"musicBrainzId": "",
|
||||
"replayGain": null
|
||||
},
|
||||
@@ -52,6 +54,7 @@
|
||||
"isVideo": false,
|
||||
"parent": "al-2",
|
||||
"title": "album-2",
|
||||
"year": 2021,
|
||||
"musicBrainzId": "",
|
||||
"replayGain": null
|
||||
},
|
||||
@@ -68,6 +71,7 @@
|
||||
"isVideo": false,
|
||||
"parent": "al-6",
|
||||
"title": "album-0",
|
||||
"year": 2021,
|
||||
"musicBrainzId": "",
|
||||
"replayGain": null
|
||||
},
|
||||
@@ -84,6 +88,7 @@
|
||||
"isVideo": false,
|
||||
"parent": "al-6",
|
||||
"title": "album-1",
|
||||
"year": 2021,
|
||||
"musicBrainzId": "",
|
||||
"replayGain": null
|
||||
},
|
||||
@@ -100,6 +105,7 @@
|
||||
"isVideo": false,
|
||||
"parent": "al-6",
|
||||
"title": "album-2",
|
||||
"year": 2021,
|
||||
"musicBrainzId": "",
|
||||
"replayGain": null
|
||||
},
|
||||
@@ -116,6 +122,7 @@
|
||||
"isVideo": false,
|
||||
"parent": "al-10",
|
||||
"title": "album-0",
|
||||
"year": 2021,
|
||||
"musicBrainzId": "",
|
||||
"replayGain": null
|
||||
},
|
||||
@@ -132,6 +139,7 @@
|
||||
"isVideo": false,
|
||||
"parent": "al-10",
|
||||
"title": "album-1",
|
||||
"year": 2021,
|
||||
"musicBrainzId": "",
|
||||
"replayGain": null
|
||||
},
|
||||
@@ -148,6 +156,7 @@
|
||||
"isVideo": false,
|
||||
"parent": "al-10",
|
||||
"title": "album-2",
|
||||
"year": 2021,
|
||||
"musicBrainzId": "",
|
||||
"replayGain": null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user