From 84364b89a65e6b9542ed07762df2b54c41f69a70 Mon Sep 17 00:00:00 2001 From: marcelveldt Date: Fri, 25 Nov 2016 01:32:10 +0100 Subject: [PATCH] some fixes --- addon.xml | 2 +- lib/helpers/pvrartwork.py | 8 ++++---- lib/helpers/utils.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addon.xml b/addon.xml index 12c8f8a..57dcc1c 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ diff --git a/lib/helpers/pvrartwork.py b/lib/helpers/pvrartwork.py index 080e47e..182bc91 100644 --- a/lib/helpers/pvrartwork.py +++ b/lib/helpers/pvrartwork.py @@ -154,7 +154,7 @@ def get_pvr_artwork(self, title, channel, genre="", manual_select=False, ignore_ if manual_select: google_title = searchtitle else: - google_title = "%s + %s" % (searchtitle, channel.lower().split(" hd")[0]) + google_title = '"%s" + "%s"' % (searchtitle, channel.lower().split(" hd")[0]) thumb = self.artutils.google.search_image(google_title, manual_select) if thumb: details["thumbnail"] = thumb @@ -318,21 +318,21 @@ def pvr_proceed_lookup(self, title, channel, genre): log_msg("PVR artwork - filter active for title: %s --> Title or channel is empty!") return False for item in self.artutils.addon.getSetting("pvr_art_ignore_titles").split("|"): - if item.lower() == title.lower(): + if item and item.lower() == title.lower(): log_msg( "PVR artwork - filter active for title: %s channel: %s genre: %s --> " "Title is in list of titles to ignore" % (title, channel, genre)) return False for item in self.artutils.addon.getSetting("pvr_art_ignore_channels").split("|"): - if item.lower() == channel.lower(): + if item and item.lower() == channel.lower(): log_msg( "PVR artwork - filter active for title: %s channel: %s genre: %s --> " "Channel is in list of channels to ignore" % (title, channel, genre)) return False for item in self.artutils.addon.getSetting("pvr_art_ignore_genres").split("|"): - if genre and item.lower() in genre.lower(): + if genre and item and item.lower() in genre.lower(): log_msg( "PVR artwork - filter active for title: %s channel: %s genre: %s --> " "Genre is in list of Genres to ignore" % diff --git a/lib/helpers/utils.py b/lib/helpers/utils.py index 090475a..0651e15 100644 --- a/lib/helpers/utils.py +++ b/lib/helpers/utils.py @@ -358,7 +358,7 @@ def detect_plugin_content(plugin_path): break else: # VIDEO ITEMS - if item["showtitle"] and not item["artist"]: + if item["showtitle"] and not item.get("artist"): # this is a tvshow, episode or season... if item["type"] == "season" or (item["season"] > -1 and item["episode"] == -1): content_type = "seasons"