1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Fix for issue #1010 - EZRSS issues with attribute name change from filename to fileName

This commit is contained in:
echel0n 2014-12-02 23:03:40 -08:00
parent 2354c74247
commit f6370c6756

View File

@ -55,11 +55,10 @@ class EZRSSProvider(generic.TorrentProvider):
def getQuality(self, item, anime=False):
if not 'filename' in item:
return Quality.UNKNOWN
filename = item.filename
quality = Quality.sceneQuality(filename, anime)
try:
quality = Quality.sceneQuality(item.filename, anime)
except:
quality = Quality.UNKNOWN
return quality
@ -138,23 +137,20 @@ class EZRSSProvider(generic.TorrentProvider):
if title and url:
logger.log(u"RSS Feed provider: [" + self.name + "] Attempting to add item to cache: " + title, logger.DEBUG)
results.append(curItem)
else:
logger.log(
u"The XML returned from the " + self.name + " RSS feed is empty or incomplete, this result is unusable",
logger.ERROR)
return results
def _get_title_and_url(self, item):
(title, url) = generic.TorrentProvider._get_title_and_url(self, item)
if 'filename' in item:
filename = item.filename
if filename:
new_title = self._extract_name_from_filename(filename)
if new_title:
title = new_title
logger.log(u"Extracted the name " + title + " from the torrent link", logger.DEBUG)
try:
new_title = self._extract_name_from_filename(item.filename)
except:
new_title = None
if new_title:
title = new_title
logger.log(u"Extracted the name " + title + " from the torrent link", logger.DEBUG)
return (title, url)
@ -185,9 +181,6 @@ class EZRSSCache(tvcache.TVCache):
data = self.getRSSFeed(rss_url)
if data and 'entries' in data:
return data.entries
else:
return []
return data.entries or []
provider = EZRSSProvider()