Fix --match-title and --reject-title decoding (Closes #690)

This commit is contained in:
Philipp Hagemeister 2013-02-21 17:09:39 +01:00
parent 1013186a17
commit 8271226a55
3 changed files with 11 additions and 4 deletions

View file

@ -370,12 +370,10 @@ class FileDownloader(object):
title = info_dict['title']
matchtitle = self.params.get('matchtitle', False)
if matchtitle:
matchtitle = matchtitle.decode('utf8')
if not re.search(matchtitle, title, re.IGNORECASE):
return u'[download] "' + title + '" title did not match pattern "' + matchtitle + '"'
rejecttitle = self.params.get('rejecttitle', False)
if rejecttitle:
rejecttitle = rejecttitle.decode('utf8')
if re.search(rejecttitle, title, re.IGNORECASE):
return u'"' + title + '" title matched reject pattern "' + rejecttitle + '"'
return None