[jellyfin] fix multiple sessions for device and update deps (#12794)
Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
This commit is contained in:
@@ -383,7 +383,7 @@ public class JellyfinServerHandler extends BaseBridgeHandler {
|
||||
@Nullable
|
||||
SessionInfo clientSession = sessions.stream()
|
||||
.filter(session -> Objects.equals(session.getDeviceId(), handler.getThing().getUID().getId()))
|
||||
.findFirst().orElse(null);
|
||||
.sorted((a, b) -> b.getLastActivityDate().compareTo(a.getLastActivityDate())).findFirst().orElse(null);
|
||||
handler.updateStateFromSession(clientSession);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user