Skip to content

Commit

Permalink
freeleech
Browse files Browse the repository at this point in the history
  • Loading branch information
duramato authored and fernandog committed Apr 2, 2016
1 parent 516804d commit 4b0cf1e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions sickbeard/providers/sceneelite.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def __init__(self):
# Torrent Stats
self.minseed = None
self.minleech = None
self.freeleech = None

# URLs
self.url = "https://sceneelite.org/"
Expand Down Expand Up @@ -89,9 +90,9 @@ def search(self, search_strings, age=0, ep_obj=None): # pylint: disable=too-man
"order": 'asc',
"page": 'search',
"sort": 'n',
"categories[]": 3,
"categories[]": 6,
"categories[]": 7
"categories[0]": 3,
"categories[1]": 6,
"categories[2]": 7
}

for mode in search_strings:
Expand All @@ -116,12 +117,15 @@ def search(self, search_strings, age=0, ep_obj=None): # pylint: disable=too-man
try:
title = torrent.pop("name", "")
id = str(torrent.pop("id", ""))
if not id:
continue
seeders = try_int(torrent.pop("seeders", ""), 1)
leechers = try_int(torrent.pop("leechers", ""), 0)
size = try_int(torrent.pop("size", ""), 0)
download_url = self.urls["download"] + id if id else None
if not download_url:
freeleech = torrent.pop("frileech")
if self.freeleech and freeleech != 1:
continue
size = try_int(torrent.pop("size", ""), 0)
download_url = self.urls["download"] + id
if seeders < self.minseed or leechers < self.minleech:
if mode != 'RSS':
logger.log(u"Torrent doesn't meet minimum seeds & leechers not selecting : {0}".format(title), logger.DEBUG)
Expand Down

0 comments on commit 4b0cf1e

Please sign in to comment.