mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-29 00:23:23 -05:00
[web] Fix count of albums and tracks in genre pages
This commit is contained in:
parent
2451ac608f
commit
cbedb4d38c
@ -33,7 +33,7 @@ const dataObject = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
set(vm, response) {
|
set(vm, response) {
|
||||||
vm.genres = new GroupedList(response.data, {
|
vm.genres = new GroupedList(response.data.genres, {
|
||||||
index: { field: 'name_sort', type: String }
|
index: { field: 'name_sort', type: String }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ const dataObject = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
set(vm, response) {
|
set(vm, response) {
|
||||||
vm.genre = response[0].data
|
vm.genre = response[0].data.genres.items[0]
|
||||||
vm.albums = new GroupedList(response[1].data.albums, {
|
vm.albums = new GroupedList(response[1].data.albums, {
|
||||||
index: { field: 'name_sort', type: String }
|
index: { field: 'name_sort', type: String }
|
||||||
})
|
})
|
||||||
|
@ -73,7 +73,7 @@ const dataObject = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
set(vm, response) {
|
set(vm, response) {
|
||||||
vm.genre = response[0].data
|
vm.genre = response[0].data.genres.items[0]
|
||||||
vm.tracks_list = new GroupedList(response[1].data.tracks)
|
vm.tracks_list = new GroupedList(response[1].data.tracks)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ const dataObject = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
set(vm, response) {
|
set(vm, response) {
|
||||||
vm.genres = new GroupedList(response.data, {
|
vm.genres = new GroupedList(response.data.genres, {
|
||||||
index: { field: 'name_sort', type: String }
|
index: { field: 'name_sort', type: String }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -115,9 +115,11 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
library_genre(genre, media_kind) {
|
library_genre(genre, media_kind) {
|
||||||
return axios.get(`./api/library/genres/${encodeURIComponent(genre)}`, {
|
const params = {
|
||||||
params: { media_kind }
|
expression: `genre is "${genre}" and media_kind is ${media_kind}`,
|
||||||
})
|
type: 'genres'
|
||||||
|
}
|
||||||
|
return axios.get('./api/search', { params })
|
||||||
},
|
},
|
||||||
|
|
||||||
library_genre_albums(genre, media_kind) {
|
library_genre_albums(genre, media_kind) {
|
||||||
@ -137,7 +139,11 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
library_genres(media_kind) {
|
library_genres(media_kind) {
|
||||||
return axios.get('./api/library/genres', { params: { media_kind } })
|
const params = {
|
||||||
|
expression: `media_kind is ${media_kind}`,
|
||||||
|
type: 'genres'
|
||||||
|
}
|
||||||
|
return axios.get('./api/search', { params })
|
||||||
},
|
},
|
||||||
|
|
||||||
library_playlist(playlistId) {
|
library_playlist(playlistId) {
|
||||||
|
Loading…
Reference in New Issue
Block a user