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:
advplyr 2022-04-24 13:28:14 -05:00
parent d5b69be7c1
commit 52fd8ac5e8
11 changed files with 33 additions and 108 deletions

View file

@ -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))