Commit a40fdd99 authored by echel0n's avatar echel0n

Fixed NoneType issue when getting title and url from search provider results

parent c506e38c
......@@ -810,13 +810,13 @@ class TorrentProvider(SearchProvider):
title, download_url = '', ''
if isinstance(item, (dict, FeedParserDict)):
title = item.get('title', '')
download_url = item.get('url', item.get('link', ''))
download_url = item.get('url', '') or item.get('link', '')
elif isinstance(item, (list, tuple)) and len(item) > 1:
title = item[0]
download_url = item[1]
# Temp global block `DIAMOND` releases
if title.endswith('DIAMOND'):
if title and title.endswith('DIAMOND'):
sickrage.app.log.info('Skipping DIAMOND release for mass fake releases.')
title = download_url = 'FAKERELEASE'
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment