mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-05-18 01:15:31 +02:00
Update for filesystem and libraries api update and revert personalized shelves route
This commit is contained in:
parent
5c31687a0f
commit
eede2bbd46
@ -86,8 +86,8 @@ export const actions = {
|
|||||||
.$get('/api/filesystem')
|
.$get('/api/filesystem')
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log('Settings folders', res)
|
console.log('Settings folders', res)
|
||||||
commit('setFolders', res)
|
commit('setFolders', res.directories)
|
||||||
return res
|
return res.directories
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error('Failed to load dirs', error)
|
console.error('Failed to load dirs', error)
|
||||||
@ -151,7 +151,7 @@ export const actions = {
|
|||||||
this.$axios
|
this.$axios
|
||||||
.$get(`/api/libraries`)
|
.$get(`/api/libraries`)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
commit('set', data)
|
commit('set', data.libraries)
|
||||||
commit('setLastLoad')
|
commit('setLastLoad')
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
@ -467,9 +467,7 @@ class LibraryController {
|
|||||||
const limitPerShelf = req.query.limit && !isNaN(req.query.limit) ? Number(req.query.limit) : 10
|
const limitPerShelf = req.query.limit && !isNaN(req.query.limit) ? Number(req.query.limit) : 10
|
||||||
|
|
||||||
const categories = libraryHelpers.buildPersonalizedShelves(req.user, libraryItems, mediaType, this.db.series, this.db.authors, limitPerShelf)
|
const categories = libraryHelpers.buildPersonalizedShelves(req.user, libraryItems, mediaType, this.db.series, this.db.authors, limitPerShelf)
|
||||||
res.json({
|
res.json(categories)
|
||||||
shelves: categories
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// PATCH: Change the order of libraries
|
// PATCH: Change the order of libraries
|
||||||
|
Loading…
Reference in New Issue
Block a user