From 25ad994ec08a4c38bfe02fcb3c6914c7b520515e Mon Sep 17 00:00:00 2001 From: Micha Albert Date: Mon, 24 Feb 2025 06:46:30 -0500 Subject: [PATCH] add total time to status command --- backend/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/main.py b/backend/main.py index 496c2aa..6c7b997 100644 --- a/backend/main.py +++ b/backend/main.py @@ -655,7 +655,7 @@ async def status_command(ack: AsyncAck, command): user=user_id, text=f"You don't have any recorded streams! Please message <@U05C64XMMHV> if you think this is a mistake." ) - + total_streamed = sum([get_recording_duration(recording, user_stream_key) for recording in stream_recs]) all_recs = "\n".join([ recording + " for " @@ -670,7 +670,7 @@ async def status_command(ack: AsyncAck, command): await bolt.client.chat_postEphemeral( channel=channel_id, user=user_id, - text=f"The server currently thinks you are {"live" if user_stream_key in [stream for stream in active_streams] else "not live"}! Here are all of your recordings: ```{all_recs}```" + text=f"The server currently thinks you are {"live" if user_stream_key in [stream for stream in active_streams] else "not live"}! It looks like you've streamed for a total of {total_streamed} minutes. Here are all of your recordings: ```{all_recs}```" )