From 437130c64168a413e63b8331470cfc3ac3e35cb0 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Tue, 2 Jul 2024 21:37:49 +0200 Subject: [PATCH] bw/groups/rooms: add logic to have different pattern and room number --- bundlewrap/groups/rooms.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bundlewrap/groups/rooms.py b/bundlewrap/groups/rooms.py index 06a5593f..d1ef8fed 100644 --- a/bundlewrap/groups/rooms.py +++ b/bundlewrap/groups/rooms.py @@ -15,13 +15,17 @@ ) for i in ROOMS: - groups[f'saal{i}'] = { + if isinstance(i, tuple): + pattern, room_number = i + else: + pattern = room_number = i + groups[f'saal{pattern}'] = { 'member_patterns': { - rf'^tallycom{i}-[0-9+]$', - rf'^(encoder|mixer|minion){i}$', + rf'^tallycom{pattern}-[0-9+]$', + rf'^(encoder|mixer|minion){pattern}$', }, 'metadata': { - 'room_number': i, + 'room_number': room_number, }, }