mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-03 01:24:37 +02:00
Add local library items to bookshelf and landing page
This commit is contained in:
parent
4f8b13b23d
commit
9fd3dc6978
15 changed files with 279 additions and 125 deletions
|
@ -87,6 +87,22 @@ class DbService {
|
|||
return data.localMediaItems
|
||||
})
|
||||
}
|
||||
|
||||
getLocalLibraryItems() {
|
||||
if (isWeb) return []
|
||||
return DbManager.getLocalLibraryItems_WV().then((data) => {
|
||||
console.log('Loaded all local media items', JSON.stringify(data))
|
||||
if (data.localLibraryItems && typeof data.localLibraryItems == 'string') {
|
||||
return JSON.parse(data.localLibraryItems)
|
||||
}
|
||||
return data.localLibraryItems
|
||||
})
|
||||
}
|
||||
|
||||
getLocalLibraryItem(id) {
|
||||
if (isWeb) return null
|
||||
return DbManager.getLocalLibraryItem_WV({ id })
|
||||
}
|
||||
}
|
||||
|
||||
export default ({ app, store }, inject) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue