mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-28 14:49:38 +00:00
Update:Remove RSS feeds from login response payload and include feeds from library items request
This commit is contained in:
parent
8bbfee334c
commit
0e6b0d3eff
9 changed files with 36 additions and 55 deletions
|
|
@ -260,7 +260,7 @@ export default {
|
|||
return this.bookCoverAspectRatio === 1
|
||||
},
|
||||
sizeMultiplier() {
|
||||
var baseSize = this.squareAspectRatio ? 192 : 120
|
||||
const baseSize = this.squareAspectRatio ? 192 : 120
|
||||
return this.width / baseSize
|
||||
},
|
||||
title() {
|
||||
|
|
@ -538,11 +538,11 @@ export default {
|
|||
return this.author
|
||||
},
|
||||
isAlternativeBookshelfView() {
|
||||
var constants = this.$constants || this.$nuxt.$constants
|
||||
const constants = this.$constants || this.$nuxt.$constants
|
||||
return this.bookshelfView === constants.BookshelfView.DETAIL
|
||||
},
|
||||
isAuthorBookshelfView() {
|
||||
var constants = this.$constants || this.$nuxt.$constants
|
||||
const constants = this.$constants || this.$nuxt.$constants
|
||||
return this.bookshelfView === constants.BookshelfView.AUTHOR
|
||||
},
|
||||
titleDisplayBottomOffset() {
|
||||
|
|
@ -552,7 +552,7 @@ export default {
|
|||
},
|
||||
rssFeed() {
|
||||
if (this.booksInSeries) return null
|
||||
return this.store.getters['feeds/getFeedForItem'](this.libraryItemId)
|
||||
return this._libraryItem.rssFeed || null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -330,10 +330,10 @@ export default {
|
|||
this.$store.commit('libraries/removeUserPlaylist', playlist)
|
||||
},
|
||||
rssFeedOpen(data) {
|
||||
this.$store.commit('feeds/addFeed', data)
|
||||
console.log('RSS Feed Open', data)
|
||||
},
|
||||
rssFeedClosed(data) {
|
||||
this.$store.commit('feeds/removeFeed', data)
|
||||
console.log('RSS Feed Closed', data)
|
||||
},
|
||||
backupApplied() {
|
||||
// Force refresh
|
||||
|
|
|
|||
|
|
@ -127,7 +127,6 @@ export default {
|
|||
setUser({ user, userDefaultLibraryId, serverSettings, Source, feeds }) {
|
||||
this.$store.commit('setServerSettings', serverSettings)
|
||||
this.$store.commit('setSource', Source)
|
||||
this.$store.commit('feeds/setFeeds', feeds)
|
||||
this.$setServerLanguageCode(serverSettings.language)
|
||||
|
||||
if (serverSettings.chromecastEnabled) {
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
|
||||
export const state = () => ({
|
||||
feeds: []
|
||||
})
|
||||
|
||||
export const getters = {
|
||||
getFeedForItem: state => id => {
|
||||
return state.feeds.find(feed => feed.id === id)
|
||||
}
|
||||
}
|
||||
|
||||
export const actions = {
|
||||
|
||||
}
|
||||
|
||||
export const mutations = {
|
||||
addFeed(state, feed) {
|
||||
var index = state.feeds.findIndex(f => f.id === feed.id)
|
||||
if (index >= 0) state.feeds.splice(index, 1, feed)
|
||||
else state.feeds.push(feed)
|
||||
},
|
||||
removeFeed(state, feed) {
|
||||
state.feeds = state.feeds.filter(f => f.id !== feed.id)
|
||||
},
|
||||
setFeeds(state, feeds) {
|
||||
state.feeds = feeds || []
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue