mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-14 15:09:00 +02:00
Finish lazy bookshelf,Fix:Async sql db,Fix:Load user progress
This commit is contained in:
parent
37d3021302
commit
3232b519d3
42 changed files with 613 additions and 1878 deletions
|
@ -109,6 +109,25 @@ class LocalStorage {
|
|||
}
|
||||
}
|
||||
|
||||
async setServerSettings(settings) {
|
||||
try {
|
||||
await Storage.set({ key: 'serverSettings', value: JSON.stringify(settings) })
|
||||
console.log('Saved server settings', JSON.stringify(settings))
|
||||
} catch (error) {
|
||||
console.error('[LocalStorage] Failed to update server settings', error)
|
||||
}
|
||||
}
|
||||
|
||||
async getServerSettings() {
|
||||
try {
|
||||
var settingsObj = await Storage.get({ key: 'serverSettings' }) || {}
|
||||
return settingsObj.value ? JSON.parse(settingsObj.value) : null
|
||||
} catch (error) {
|
||||
console.error('[LocalStorage] Failed to get server settings', error)
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
async setCurrent(current) {
|
||||
try {
|
||||
if (current) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue