Add download UI indicator, download progress, update bookshelf item to show local items and items matches with local item, remove item before downloading if already exists in file system

This commit is contained in:
advplyr 2022-04-07 18:46:58 -05:00
parent ee942c6704
commit 119bfd6c98
18 changed files with 520 additions and 80 deletions

View file

@ -84,9 +84,9 @@ class DbService {
})
}
getLocalLibraryItems() {
getLocalLibraryItems(mediaType = null) {
if (isWeb) return []
return AbsDatabase.getLocalLibraryItems().then((data) => {
return AbsDatabase.getLocalLibraryItems(mediaType).then((data) => {
console.log('Loaded all local media items', JSON.stringify(data))
if (data.localLibraryItems && typeof data.localLibraryItems == 'string') {
return JSON.parse(data.localLibraryItems)
@ -99,6 +99,11 @@ class DbService {
if (isWeb) return null
return AbsDatabase.getLocalLibraryItem({ id })
}
getLocalLibraryItemByLLId(libraryItemId) {
if (isWeb) return null
return AbsDatabase.getLocalLibraryItemByLLId({ libraryItemId })
}
}
export default ({ app, store }, inject) => {