mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-04 02:05:06 +02:00
Add remaining personalized shelf queries, update book libraries home page to use new API endpoint
This commit is contained in:
parent
80b3bfea51
commit
09eefae808
20 changed files with 359 additions and 26 deletions
|
@ -68,6 +68,9 @@ export default {
|
|||
currentLibraryId() {
|
||||
return this.$store.state.libraries.currentLibraryId
|
||||
},
|
||||
currentLibraryMediaType() {
|
||||
return this.$store.getters['libraries/getCurrentLibraryMediaType']
|
||||
},
|
||||
libraryName() {
|
||||
return this.$store.getters['libraries/getCurrentLibraryName']
|
||||
},
|
||||
|
@ -167,8 +170,9 @@ export default {
|
|||
this.loaded = true
|
||||
},
|
||||
async fetchCategories() {
|
||||
const endpoint = this.currentLibraryMediaType === 'book' ? 'personalized2' : 'personalized'
|
||||
const categories = await this.$axios
|
||||
.$get(`/api/libraries/${this.currentLibraryId}/personalized?include=rssfeed,numEpisodesIncomplete`)
|
||||
.$get(`/api/libraries/${this.currentLibraryId}/${endpoint}?include=rssfeed,numEpisodesIncomplete`)
|
||||
.then((data) => {
|
||||
return data
|
||||
})
|
||||
|
@ -346,8 +350,6 @@ export default {
|
|||
})
|
||||
},
|
||||
episodeAdded(episodeWithLibraryItem) {
|
||||
console.log('Podcast episode added', episodeWithLibraryItem)
|
||||
|
||||
const isThisLibrary = episodeWithLibraryItem.libraryItem?.libraryId === this.currentLibraryId
|
||||
if (!this.search && isThisLibrary) {
|
||||
this.fetchCategories()
|
||||
|
|
|
@ -348,6 +348,10 @@ export default {
|
|||
},
|
||||
tracks() {
|
||||
return [
|
||||
{
|
||||
id: 'none',
|
||||
name: this.$strings.LabelTracksNone
|
||||
},
|
||||
{
|
||||
id: 'single',
|
||||
name: this.$strings.LabelTracksSingleTrack
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue