mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-03 09:34:51 +02:00
Add start of new local media page for adding folders and scanning local media items
This commit is contained in:
parent
a8de03b82d
commit
a259883979
14 changed files with 698 additions and 73 deletions
|
@ -22,6 +22,29 @@ class DbService {
|
|||
return null
|
||||
})
|
||||
}
|
||||
|
||||
loadFolders() {
|
||||
return DbManager.localFoldersFromWebView().then((data) => {
|
||||
console.log('Loaded local folders', JSON.stringify(data))
|
||||
if (data.folders && typeof data.folders == 'string') {
|
||||
return JSON.parse(data.folders)
|
||||
}
|
||||
return data.folders
|
||||
}).catch((error) => {
|
||||
console.error('Failed to load', error)
|
||||
return null
|
||||
})
|
||||
}
|
||||
|
||||
loadLocalMediaItemsInFolder(folderId) {
|
||||
return DbManager.loadMediaItemsInFolder({ folderId }).then((data) => {
|
||||
console.log('Loaded local media items in folder', JSON.stringify(data))
|
||||
if (data.localMediaItems && typeof data.localMediaItems == 'string') {
|
||||
return JSON.parse(data.localMediaItems)
|
||||
}
|
||||
return data.localMediaItems
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default ({ app, store }, inject) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue