mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 03:22:22 -05:00
Fix for issue #1010 - EZRSS issues with attribute name change from filename to fileName
This commit is contained in:
parent
2354c74247
commit
f6370c6756
@ -55,11 +55,10 @@ class EZRSSProvider(generic.TorrentProvider):
|
|||||||
|
|
||||||
def getQuality(self, item, anime=False):
|
def getQuality(self, item, anime=False):
|
||||||
|
|
||||||
if not 'filename' in item:
|
try:
|
||||||
return Quality.UNKNOWN
|
quality = Quality.sceneQuality(item.filename, anime)
|
||||||
|
except:
|
||||||
filename = item.filename
|
quality = Quality.UNKNOWN
|
||||||
quality = Quality.sceneQuality(filename, anime)
|
|
||||||
|
|
||||||
return quality
|
return quality
|
||||||
|
|
||||||
@ -138,23 +137,20 @@ class EZRSSProvider(generic.TorrentProvider):
|
|||||||
if title and url:
|
if title and url:
|
||||||
logger.log(u"RSS Feed provider: [" + self.name + "] Attempting to add item to cache: " + title, logger.DEBUG)
|
logger.log(u"RSS Feed provider: [" + self.name + "] Attempting to add item to cache: " + title, logger.DEBUG)
|
||||||
results.append(curItem)
|
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
|
return results
|
||||||
|
|
||||||
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)
|
||||||
|
|
||||||
if 'filename' in item:
|
try:
|
||||||
filename = item.filename
|
new_title = self._extract_name_from_filename(item.filename)
|
||||||
if filename:
|
except:
|
||||||
new_title = self._extract_name_from_filename(filename)
|
new_title = None
|
||||||
if new_title:
|
|
||||||
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)
|
||||||
|
|
||||||
@ -185,9 +181,6 @@ class EZRSSCache(tvcache.TVCache):
|
|||||||
|
|
||||||
data = self.getRSSFeed(rss_url)
|
data = self.getRSSFeed(rss_url)
|
||||||
|
|
||||||
if data and 'entries' in data:
|
return data.entries or []
|
||||||
return data.entries
|
|
||||||
else:
|
|
||||||
return []
|
|
||||||
|
|
||||||
provider = EZRSSProvider()
|
provider = EZRSSProvider()
|
||||||
|
Loading…
Reference in New Issue
Block a user