1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-13 11:32:20 -05:00

Proper fix for EZRSS, issue #984 , previous fix actually totally broke EZRSS. See comment in a791b3f.

This commit is contained in:
Dustyn Gibson 2014-11-30 22:31:38 -08:00
parent 44396490cd
commit 8ae0d51f7b

View File

@ -55,7 +55,10 @@ class EZRSSProvider(generic.TorrentProvider):
def getQuality(self, item, anime=False): def getQuality(self, item, anime=False):
filename = item.fileName if not 'filename' in item:
return Quality.UNKNOWN
filename = item.filename
quality = Quality.sceneQuality(filename, anime) quality = Quality.sceneQuality(filename, anime)
return quality return quality
@ -137,7 +140,7 @@ class EZRSSProvider(generic.TorrentProvider):
results.append(curItem) results.append(curItem)
else: else:
logger.log( logger.log(
u"The XML returned from the " + self.name + " RSS feed is incomplete, this result is unusable", u"The XML returned from the " + self.name + " RSS feed is empty or incomplete, this result is unusable",
logger.ERROR) logger.ERROR)
return results return results
@ -145,12 +148,13 @@ class EZRSSProvider(generic.TorrentProvider):
def _get_title_and_url(self, item): def _get_title_and_url(self, item):
(title, url) = generic.TorrentProvider._get_title_and_url(self, item) (title, url) = generic.TorrentProvider._get_title_and_url(self, item)
filename = item.fileName if 'filename' in item:
if filename: filename = item.filename
new_title = self._extract_name_from_filename(filename) if filename:
if new_title: new_title = self._extract_name_from_filename(filename)
title = new_title if new_title:
logger.log(u"Extracted the name " + title + " from the torrent link", logger.DEBUG) title = new_title
logger.log(u"Extracted the name " + title + " from the torrent link", logger.DEBUG)
return (title, url) return (title, url)