Skip to content

Commit

Permalink
Handle streams without bitrate
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolaSmaniotto committed Dec 3, 2024
1 parent 43d4555 commit b97b280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/media_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down

0 comments on commit b97b280

Please sign in to comment.