From 61bf045618b971af11b025bdea77291177488f12 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Mon, 18 Apr 2022 11:55:43 +0200 Subject: [PATCH] Fix crash when no type following the same code pattern as the one below --- lib/libmediathek4.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libmediathek4.py b/lib/libmediathek4.py index 99242d2..56d6f01 100644 --- a/lib/libmediathek4.py +++ b/lib/libmediathek4.py @@ -135,7 +135,7 @@ def addEntries(self,d): ok=True - if item['type'] in ['audio','songs']: + if item.get('type',None) in ['audio','songs']: liz.setInfo( type="music", infoLabels=ilabels) else: liz.setInfo( type="Video", infoLabels=ilabels) @@ -383,4 +383,4 @@ def _calcyyyymmdd(self,d): def _calcddmmyyyy(self,d): day = date.today() - timedelta(d) - return day.strftime('%d-%m-%Y') \ No newline at end of file + return day.strftime('%d-%m-%Y')