]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
in python 3, dict.has_key() has been removed
authorChristian Eiden <christian@eiden.ch>
Tue, 3 Nov 2020 09:12:20 +0000 (10:12 +0100)
committerFlole998 <Flole998@users.noreply.github.com>
Sat, 14 Nov 2020 15:44:53 +0000 (16:44 +0100)
Ased in operator instead.
Also, added check for empty string.

Signed-off-by: Christian Eiden <christian@eiden.ch>
support/tvhmeta

index 31b3f1aa438062c8117a6d787344359cc29c5bac..89e22e58063e4b529cec2163bd0fc9eb2537c027 100755 (executable)
@@ -233,7 +233,7 @@ class TvhMeta(object):
     if title_tuple is None:
         raise RuntimeError("Record has no title: " + data)
 
-    if not force_refresh and rec.has_key("image") and rec.has_key("fanart_image") and rec["image"] is not None and rec["fanart_image"] is not None:
+    if not force_refresh and "image" in rec and "fanart_image" in rec and rec["image"] is not None and rec["image"] != "" and rec["fanart_image"] is not None and rec["fanart_image"] != "":
         logging.info("We have both image and fanart_image already for %s so nothing to do (%s)", uuid, recjson)
         return