mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-31 23:57:15 +02:00
Fix missing braces
This commit is contained in:
@@ -132,6 +132,7 @@ class Database {
|
|||||||
return instance.objects(ServerConnectionConfigActiveIndex.self).first?.index ?? nil
|
return instance.objects(ServerConnectionConfigActiveIndex.self).first?.index ?? nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public func setDeviceSettings(deviceSettings: DeviceSettings) {
|
public func setDeviceSettings(deviceSettings: DeviceSettings) {
|
||||||
Database.realmQueue.sync {
|
Database.realmQueue.sync {
|
||||||
let existing = instance.objects(DeviceSettings.self)
|
let existing = instance.objects(DeviceSettings.self)
|
||||||
@@ -143,6 +144,9 @@ class Database {
|
|||||||
}
|
}
|
||||||
} catch(let exception) {
|
} catch(let exception) {
|
||||||
NSLog("failed to save device settings")
|
NSLog("failed to save device settings")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public func getLocalLibraryItems(mediaType: MediaType? = nil) -> [LocalLibraryItem] {
|
public func getLocalLibraryItems(mediaType: MediaType? = nil) -> [LocalLibraryItem] {
|
||||||
var localLibraryItems: [ThreadSafeReference<LocalLibraryItem>] = []
|
var localLibraryItems: [ThreadSafeReference<LocalLibraryItem>] = []
|
||||||
@@ -190,6 +194,7 @@ class Database {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public func getDeviceSettings() -> DeviceSettings {
|
public func getDeviceSettings() -> DeviceSettings {
|
||||||
return Database.realmQueue.sync {
|
return Database.realmQueue.sync {
|
||||||
return instance.objects(DeviceSettings.self).first ?? getDefaultDeviceSettings()
|
return instance.objects(DeviceSettings.self).first ?? getDefaultDeviceSettings()
|
||||||
@@ -207,10 +212,10 @@ class Database {
|
|||||||
NSLog("Unable to find local library item to delete")
|
NSLog("Unable to find local library item to delete")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch(let exception) {
|
} catch (let exception) {
|
||||||
NSLog("Unable to delete local library item")
|
NSLog("Unable to delete local library item")
|
||||||
debugPrint(exception)
|
debugPrint(exception)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user