Private GIT

Skip to content
Snippets Groups Projects
Commit 607fb259 authored by Dustyn Gibson's avatar Dustyn Gibson
Browse files

Merge pull request #1971 from miigotu/fix-1814

Fixes /SiCKRAGETV/sickrage-issues#1814 Fixes /SiCKRAGETV/sickrage-iss…
parents 850311ce ead51002
Branches
Tags
No related merge requests found
......@@ -214,6 +214,13 @@ class KATProvider(generic.TorrentProvider):
return [search_string]
def _get_size(self, item):
title, url, id, seeders, leechers, size, pubdate = item
if not size:
return -1
return size
def _doSearch(self, search_params, search_mode='eponly', epcount=0, age=0, epObj=None):
results = []
......@@ -243,7 +250,7 @@ class KATProvider(generic.TorrentProvider):
seeders = int(item['torrent_seeds'])
leechers = int(item['torrent_peers'])
size = int(item['torrent_contentlength'])
except (AttributeError, TypeError):
except (AttributeError, TypeError, KeyError):
continue
if mode != 'RSS' and (seeders < self.minseed or leechers < self.minleech):
......
......@@ -101,6 +101,14 @@ class OmgwtfnzbsProvider(generic.NZBProvider):
def _get_title_and_url(self, item):
return (item['release'], item['getnzb'])
def _get_size(self, item):
try:
size = int(item['sizebytes'])
except (ValueError, TypeError, AttributeError, KeyError):
return -1
return size
def _doSearch(self, search, search_mode='eponly', epcount=0, retention=0, epObj=None):
self._checkAuth()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment