mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-26 13:24:39 +02:00
Fix server config not factored in determining active session
This commit is contained in:
@@ -159,7 +159,9 @@ class PlayerHandler {
|
||||
|
||||
private static func cleanupOldSessions(currentSessionId: String?) {
|
||||
let realm = try! Realm()
|
||||
let oldSessions = realm.objects(PlaybackSession.self) .where({ $0.isActiveSession == true })
|
||||
let oldSessions = realm.objects(PlaybackSession.self) .where({
|
||||
$0.isActiveSession == true && $0.serverConnectionConfigId == Store.serverConfig?.id
|
||||
})
|
||||
try! realm.write {
|
||||
for s in oldSessions {
|
||||
if s.id != currentSessionId {
|
||||
|
||||
Reference in New Issue
Block a user