mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-04 18:15:01 +02:00
Fix missing braces
This commit is contained in:
parent
affcdea09b
commit
f40da562a6
1 changed files with 9 additions and 4 deletions
|
@ -132,6 +132,7 @@ class Database {
|
|||
return instance.objects(ServerConnectionConfigActiveIndex.self).first?.index ?? nil
|
||||
}
|
||||
}
|
||||
|
||||
public func setDeviceSettings(deviceSettings: DeviceSettings) {
|
||||
Database.realmQueue.sync {
|
||||
let existing = instance.objects(DeviceSettings.self)
|
||||
|
@ -143,6 +144,9 @@ class Database {
|
|||
}
|
||||
} catch(let exception) {
|
||||
NSLog("failed to save device settings")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public func getLocalLibraryItems(mediaType: MediaType? = nil) -> [LocalLibraryItem] {
|
||||
var localLibraryItems: [ThreadSafeReference<LocalLibraryItem>] = []
|
||||
|
@ -190,6 +194,7 @@ class Database {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public func getDeviceSettings() -> DeviceSettings {
|
||||
return Database.realmQueue.sync {
|
||||
return instance.objects(DeviceSettings.self).first ?? getDefaultDeviceSettings()
|
||||
|
@ -207,10 +212,10 @@ class Database {
|
|||
NSLog("Unable to find local library item to delete")
|
||||
}
|
||||
}
|
||||
} catch(let exception) {
|
||||
NSLog("Unable to delete local library item")
|
||||
debugPrint(exception)
|
||||
}
|
||||
} catch (let exception) {
|
||||
NSLog("Unable to delete local library item")
|
||||
debugPrint(exception)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue