'exclude' parameter is case insensitive

This commit is contained in:
Romain Bignon 2012-12-24 12:55:53 +01:00
commit e18c198db3

View file

@ -96,7 +96,7 @@ class Downloadboob:
if not self.is_downloaded(video): if not self.is_downloaded(video):
self.backend.fill_video(video, ('url','title', 'url', 'duration')) self.backend.fill_video(video, ('url','title', 'url', 'duration'))
if not(self.is_excluded(video.title, title_exclude)): if not(self.is_excluded(video.title.lower(), title_exclude)):
print " %s\n Id:%s\n Duration:%s" % (video.title, video.id, video.duration) print " %s\n Id:%s\n Duration:%s" % (video.title, video.id, video.duration)
videos.append(video) videos.append(video)
else: else:
@ -113,7 +113,7 @@ class Downloadboob:
def is_excluded(self, title, title_exclude): def is_excluded(self, title, title_exclude):
for exclude in title_exclude: for exclude in title_exclude:
if title.find(exclude) > -1: if title.find(exclude.lower()) > -1:
return True return True
return False return False