From 3b15ffd98ad2f3777f396135faaf2186a416cda5 Mon Sep 17 00:00:00 2001 From: Scott Alfter Date: Tue, 19 Nov 2024 10:32:06 -0800 Subject: [PATCH] handle unknown audio language --- pickstreams.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pickstreams.py b/pickstreams.py index 8022e96..578ee99 100755 --- a/pickstreams.py +++ b/pickstreams.py @@ -52,7 +52,12 @@ for i in streams: out=out+" "+str(int(i["tags"]["BPS"])/1000) except KeyError: out=out+" unknown" - out=out+" "+i["tags"]["language"] + try: + out=out+" "+i["tags"]["language"] + except KeyError: + out=out+" unk" + if audio_lang!="": + matched=False if i["disposition"]["default"]==1: out=out+" default" if matched==True: