Waffles - get full title to allow filtering

Currently strips the suffix from the title which has info such as
[2013-CD-FLAC-Vinyl-24 96-Lossless]. Change to put this back in to
allow ignore word filtering. Should also fix the parsing issue getting
'NoneType' object has no attribute 'group'
This commit is contained in:
Ade
2013-08-03 23:32:07 +12:00
parent 3d3ed4ac94
commit a32b77c589

View File

@@ -928,22 +928,19 @@ def searchTorrent(albumid=None, new=False, losslessOnly=False):
logger.info(u'Parsing results from <a href="%s">Waffles.fm</a>' % searchURL)
d = feedparser.parse(data)
if not len(d.entries):
logger.info(u"No results found from %s for %s" % (provider, term))
pass
else:
for item in d.entries:
try:
title_match = re.search(r"(.+)\[(.+)\]$", item.title)
title = title_match.group(1).strip()
details = title_match.group(2).split("-")
try:
title = item.title
desc_match = re.search(r"Size: (\d+)<", item.description)
size = desc_match.group(1)
url = item.link
resultlist.append((title, size, url, provider))
logger.info('Found %s. Size: %s' % (title, helpers.bytes_to_mb(size)))
except Exception, e: