diff options
| author | gion <oancaionutandrei@gmail.com> | 2020-04-03 10:11:55 +0200 |
|---|---|---|
| committer | gion <oancaionutandrei@gmail.com> | 2020-04-27 22:07:33 +0200 |
| commit | b3354ec6374e2491679c699aaff8ee407dd0ac7c (patch) | |
| tree | ac8dc1e20bc31b7d1e1c7450caa03c98e75683d2 | |
| parent | 10c2c62f07fb4088480ff580ab67c1bc10a057a4 (diff) | |
Ignore unrelated events
| -rw-r--r-- | Emby.Server.Implementations/Syncplay/SyncplayManager.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Syncplay/SyncplayManager.cs b/Emby.Server.Implementations/Syncplay/SyncplayManager.cs index 6bfd6aa9b..7583793bb 100644 --- a/Emby.Server.Implementations/Syncplay/SyncplayManager.cs +++ b/Emby.Server.Implementations/Syncplay/SyncplayManager.cs @@ -91,12 +91,16 @@ namespace Emby.Server.Implementations.Syncplay void _sessionManager_SessionEnded(object sender, SessionEventArgs e) { - LeaveGroup(e.SessionInfo); + var user = e.SessionInfo; + if (!IsUserInGroup(user)) return; + LeaveGroup(user); } void _sessionManager_PlaybackStopped(object sender, PlaybackStopEventArgs e) { - LeaveGroup(e.Session); + var user = e.Session; + if (!IsUserInGroup(user)) return; + LeaveGroup(user); } private bool IsUserInGroup(SessionInfo user) |
