From f19aaa62332b58e0f3869b323a713108589c8547 Mon Sep 17 00:00:00 2001 From: MingxuanGame Date: Wed, 13 Aug 2025 08:19:39 +0000 Subject: [PATCH] fix(multiplayer): failed to add items --- app/models/multiplayer_hub.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/models/multiplayer_hub.py b/app/models/multiplayer_hub.py index 90613de..5f99136 100644 --- a/app/models/multiplayer_hub.py +++ b/app/models/multiplayer_hub.py @@ -507,7 +507,13 @@ class MultiplayerQueue: limit = HOST_LIMIT if is_host else PER_USER_LIMIT if ( - len([True for u in self.room.playlist if u.owner_id == user.user_id]) + len( + [ + True + for u in self.room.playlist + if u.owner_id == user.user_id and not u.expired + ] + ) >= limit ): raise InvokeException(f"You can only have {limit} items in the queue")