mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-01 13:04:52 +02:00
Update:Add libraries playlists API endpoint, add lazy playlists card
This commit is contained in:
parent
0979b3e03d
commit
7e171576e0
13 changed files with 207 additions and 39 deletions
|
@ -75,7 +75,7 @@ export default {
|
|||
return selectedPlaylistItem.libraryItem.media.metadata.title || ''
|
||||
},
|
||||
playlists() {
|
||||
return this.$store.state.user.playlists || []
|
||||
return this.$store.state.libraries.userPlaylists || []
|
||||
},
|
||||
bookCoverAspectRatio() {
|
||||
return this.$store.getters['libraries/getBookCoverAspectRatio']
|
||||
|
@ -113,9 +113,9 @@ export default {
|
|||
if (!this.playlists.length) {
|
||||
this.processing = true
|
||||
this.$axios
|
||||
.$get(`/api/playlists`)
|
||||
.$get(`/api/libraries/${this.currentLibraryId}/playlists`)
|
||||
.then((data) => {
|
||||
this.$store.commit('user/setPlaylists', data.playlists || [])
|
||||
this.$store.commit('libraries/setUserPlaylists', data.results || [])
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Failed to get playlists', error)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue