def pvr_proceed_lookup(self, title, channel, genre, recordingdetails):
'''perform some checks if we can proceed with the lookup'''
filters = []
if not title:
filters.append("Title is empty")
for item in self._mutils.addon.getSetting("pvr_art_ignore_titles").split("|"):
if item and item.lower() == title.lower():
filters.append("Title is in list of titles to ignore")
for item in self._mutils.addon.getSetting("pvr_art_ignore_channels").split("|"):
if item and item.lower() == channel.lower():
filters.append("Channel is in list of channels to ignore")
for item in self._mutils.addon.getSetting("pvr_art_ignore_genres").split("|"):
if genre and item and item.lower() in genre.lower():
filters.append("Genre is in list of genres to ignore")
if self._mutils.addon.getSetting("pvr_art_ignore_commongenre") == "true":
# skip common genres like sports, weather, news etc.
genre = genre.lower()
kodi_strings = [19516, 19517, 19518, 19520, 19548, 19549, 19551,
19552, 19553, 19554, 19555, 19556, 19557, 19558, 19559]
for kodi_string in kodi_strings:
kodi_string = xbmc.getLocalizedString(kodi_string).lower()
if (genre and (genre in kodi_string or kodi_string in genre)) or kodi_string in title:
filters.append("Common genres like weather/sports are set to be ignored")
if self._mutils.addon.getSetting("pvr_art_recordings_only") == "true" and not recordingdetails:
filters.append("PVR Artwork is enabled for recordings only")
if filters:
filterstr = " - ".join(filters)
log_msg("PVR artwork - filter active for title: %s - channel %s --> %s" % (title, channel, filterstr))
return filterstr
else:
return ""
pvrartwork.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录