Fonctionnalités :
- #82 - Utilisateur artists plutôt que artists_sort

Co-authored-by: dbroqua <contact@darkou.fr>
Reviewed-on: https://git.darkou.fr/dbroqua/MusicTopus/pulls/84
This commit is contained in:
Damien Broqua 2023-03-23 14:34:18 +01:00
parent fbeb1a67c5
commit e0f227af08
4 changed files with 33 additions and 12 deletions

View file

@ -80,7 +80,7 @@ class Albums extends Pages {
exportFormat = "json",
sort = "artists_sort",
order = "asc",
artists_sort,
artist,
format,
year,
genre,
@ -92,8 +92,8 @@ class Albums extends Pages {
const where = {};
if (artists_sort) {
where.artists_sort = artists_sort;
if (artist) {
where["artists.name"] = artist;
}
if (format) {
where["formats.name"] = format;
@ -236,7 +236,7 @@ class Albums extends Pages {
*/
async loadMyCollection() {
const artists = await Albums.getAllDistincts(
"artists_sort",
"artists.name",
this.req.user._id
);
const formats = await Albums.getAllDistincts(
@ -301,7 +301,7 @@ class Albums extends Pages {
);
}
const artists = await Albums.getAllDistincts("artists_sort", userId);
const artists = await Albums.getAllDistincts("artists.name", userId);
const formats = await Albums.getAllDistincts("formats.name", userId);
const years = await Albums.getAllDistincts("year", userId);
const genres = await Albums.getAllDistincts("genres", userId);