mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-07-10 05:54:47 +02:00
Fix crash when probing audio files by updating start/end chapter data type to Long #128, remove unused files and generic database save/load methods
This commit is contained in:
parent
d5b69be7c1
commit
52fd8ac5e8
11 changed files with 33 additions and 108 deletions
|
@ -6,28 +6,6 @@ const isWeb = Capacitor.getPlatform() == 'web'
|
|||
class DbService {
|
||||
constructor() { }
|
||||
|
||||
// Please dont use this, it is not implemented in ios (maybe key: primary value: any ?)
|
||||
save(db, key, value) {
|
||||
if (isWeb) return
|
||||
return AbsDatabase.saveFromWebview({ db, key, value }).then(() => {
|
||||
console.log('Saved data', db, key, JSON.stringify(value))
|
||||
}).catch((error) => {
|
||||
console.error('Failed to save data', error)
|
||||
})
|
||||
}
|
||||
|
||||
// Please dont use this, it is not implemented in ios
|
||||
load(db, key) {
|
||||
if (isWeb) return null
|
||||
return AbsDatabase.loadFromWebview({ db, key }).then((data) => {
|
||||
console.log('Loaded data', db, key, JSON.stringify(data))
|
||||
return data
|
||||
}).catch((error) => {
|
||||
console.error('Failed to load', error)
|
||||
return null
|
||||
})
|
||||
}
|
||||
|
||||
getDeviceData() {
|
||||
return AbsDatabase.getDeviceData().then((data) => {
|
||||
console.log('Loaded device data', JSON.stringify(data))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue