Updated keys
This commit is contained in:
@@ -64,6 +64,7 @@ async def join_server(system_id, guild_id, channel_id):
|
|||||||
await drb_api.join_voice_channel(guild_id, channel_id)
|
await drb_api.join_voice_channel(guild_id, channel_id)
|
||||||
# Update status
|
# Update status
|
||||||
client_status = StatusValues.LISTENING
|
client_status = StatusValues.LISTENING
|
||||||
|
|
||||||
op25_status = await drb_api.get_op25_status()
|
op25_status = await drb_api.get_op25_status()
|
||||||
print("OP25 status:", op25_status)
|
print("OP25 status:", op25_status)
|
||||||
|
|
||||||
@@ -73,17 +74,17 @@ async def join_server(system_id, guild_id, channel_id):
|
|||||||
print("System details:", sys_details)
|
print("System details:", sys_details)
|
||||||
if not sys_details:
|
if not sys_details:
|
||||||
# TODO - handle not having channel details
|
# TODO - handle not having channel details
|
||||||
pass
|
return
|
||||||
|
|
||||||
# Generate the config for the channel requested
|
# Generate the config for the channel requested
|
||||||
tags_list = [TalkgroupTag(**tag_dict) for tag_dict in sys_details.get('tags', []) if tag_dict] if sys_details.get('tags') is not None else None
|
tags_list = [TalkgroupTag(**tag_dict) for tag_dict in sys_details.get('tags', []) if tag_dict] if sys_details.get('tags') is not None else None
|
||||||
|
|
||||||
sys_config = ConfigGenerator(
|
sys_config = ConfigGenerator(
|
||||||
type=sys_details.get('decode_mode'),
|
type=sys_details.get('type'),
|
||||||
systemName=sys_details['name'],
|
systemName=sys_details['name'],
|
||||||
channels=sys_details.get('frequency_list_khz'), # Assuming 'channels' is the correct field name
|
channels=sys_details.get('frequency_khz'),
|
||||||
tags=tags_list,
|
tags=tags_list,
|
||||||
whitelist=sys_details.get('tag_whitelist') # Use .get for optional fields
|
whitelist=sys_details.get('tag_whitelist')
|
||||||
)
|
)
|
||||||
|
|
||||||
# Set the OP25 config
|
# Set the OP25 config
|
||||||
|
|||||||
Reference in New Issue
Block a user