From b97b28047aa7c9d95a27945b942cb5e1da539a71 Mon Sep 17 00:00:00 2001 From: Nicola Smaniotto Date: Tue, 3 Dec 2024 22:36:14 +0100 Subject: [PATCH] Handle streams without bitrate --- modules/media_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/media_server.py b/modules/media_server.py index be9ced0..056aaf6 100644 --- a/modules/media_server.py +++ b/modules/media_server.py @@ -254,7 +254,7 @@ def get_bandwidth(self) -> int: bandwidth = 0 for stream in session["NowPlayingItem"]["MediaStreams"]: - bandwidth += int(stream["BitRate"]) + bandwidth += int(stream.get("BitRate", 0)) else: bandwidth = int(session["TranscodingInfo"]["Bitrate"])