RSS: bug fix. (Bad import from gribble?)

This commit is contained in:
Valentin Lorentz 2011-08-26 17:16:13 +02:00
parent e98ac0f4c2
commit 08a28214b8

View File

@ -198,15 +198,19 @@ class RSS(callbacks.Plugin):
v = False v = False
break break
return v return v
for channel in channels: fnor channel in channels:
if len(oldheadlines) == 0: if len(oldheadlines) == 0:
channelnewheadlines = newheadlines[:self.registryValue('initialAnnounceHeadlines', channel)] channelnewheadlines = newheadlines[:self.registryValue('initialAnnounceHeadlines', channel)]
else:
channelnewheadlines = newheadlines[:]
whitelist = self.registryValue('keywordWhitelist', channel) whitelist = self.registryValue('keywordWhitelist', channel)
blacklist = self.registryValue('keywordBlacklist', channel) blacklist = self.registryValue('keywordBlacklist', channel)
if len(whitelist) != 0: if len(whitelist) != 0:
channelnewheadlines = filter(filter_whitelist, channelnewheadlines) channelnewheadlines = filter(filter_whitelist, channelnewheadlines)
if len(blacklist) != 0: if len(blacklist) != 0:
channelnewheadlines = filter(filter_blacklist, channelnewheadlines) channelnewheadlines = filter(filter_blacklist, channelnewheadlines)
if len(channelnewheadlines) == 0:
return
bold = self.registryValue('bold', channel) bold = self.registryValue('bold', channel)
sep = self.registryValue('headlineSeparator', channel) sep = self.registryValue('headlineSeparator', channel)
prefix = self.registryValue('announcementPrefix', channel) prefix = self.registryValue('announcementPrefix', channel)