mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Merge pull request #537 from JackDandy/feature/RemoveStrike
Remove Strike torrent provider
This commit is contained in:
commit
52ab3c7890
6 changed files with 4 additions and 87 deletions
|
@ -48,9 +48,10 @@
|
|||
* Fix py-unrar2 on unix to handle different date formats output by different unrar command line versions
|
||||
* Fix Add and Edit show quality selection when Quality 'Custom' is used
|
||||
* Fix add existing shows from folders that contain a plus char
|
||||
* Fix post process issue where items in history was processed out of turn
|
||||
* Fix post process issue where items in history were processed out of turn
|
||||
* Change increase frequency of updating show data
|
||||
* Remove FreshOnTV (TvT) torrent provider
|
||||
* Remove Strike torrent provider
|
||||
|
||||
[develop changelog]
|
||||
Enable Alpha Ratio again now that the secure login page over https is fixed
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 417 B |
|
@ -38,7 +38,7 @@ from sickbeard import providers, metadata, config, webserveInit, searchBacklog,
|
|||
from sickbeard.providers.generic import GenericProvider
|
||||
from providers import btn, newznab, womble, thepiratebay, torrentleech, kat, iptorrents, grabtheinfo, scenetime, pretome, \
|
||||
omgwtfnzbs, scc, torrentday, hdbits, speedcd, nyaatorrents, torrentbytes, beyondhd, gftracker, transmithe_net, \
|
||||
bitsoup, tokyotoshokan, animenzb, rarbg, morethan, alpharatio, pisexy, strike, torrentshack, torrenting, funfile
|
||||
bitsoup, tokyotoshokan, animenzb, rarbg, morethan, alpharatio, pisexy, torrentshack, torrenting, funfile
|
||||
from sickbeard.config import CheckSection, check_setting_int, check_setting_str, check_setting_float, ConfigMigrator, \
|
||||
naming_ep_type, minimax
|
||||
from indexers.indexer_api import indexerApi
|
||||
|
|
|
@ -36,7 +36,6 @@ __all__ = ['womble',
|
|||
'morethan',
|
||||
'alpharatio',
|
||||
'pisexy',
|
||||
'strike',
|
||||
'torrentshack',
|
||||
'beyondhd',
|
||||
'gftracker',
|
||||
|
|
|
@ -162,7 +162,7 @@ class GenericProvider:
|
|||
return False
|
||||
|
||||
urls = ['http%s://%s/%s.torrent' % (u + (torrent_hash,))
|
||||
for u in (('s', 'torcache.net/torrent'), ('s', 'getstrike.net/torrents/api/download'),
|
||||
for u in (('s', 'torcache.net/torrent'), ('', 'thetorrent.org/torrent'),
|
||||
('s', 'itorrents.org/torrent'))]
|
||||
except:
|
||||
link_type = 'torrent'
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
# coding=utf-8
|
||||
#
|
||||
# This file is part of SickGear.
|
||||
#
|
||||
# SickGear is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# SickGear is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with SickGear. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import re
|
||||
import datetime
|
||||
|
||||
from . import generic
|
||||
|
||||
|
||||
class StrikeProvider(generic.TorrentProvider):
|
||||
|
||||
def __init__(self):
|
||||
generic.TorrentProvider.__init__(self, 'Strike')
|
||||
|
||||
self.url_base = 'https://getstrike.net/'
|
||||
self.urls = {'config_provider_home_uri': self.url_base,
|
||||
'search': self.url_base + 'api/v2/torrents/search/?category=TV&phrase=%s'}
|
||||
|
||||
self.url = self.urls['config_provider_home_uri']
|
||||
|
||||
self.minseed, self.minleech = 2 * [None]
|
||||
|
||||
def _do_search(self, search_params, search_mode='eponly', epcount=0, age=0):
|
||||
|
||||
results = []
|
||||
if not self._check_auth():
|
||||
return results
|
||||
|
||||
for mode in search_params.keys():
|
||||
for search_string in search_params[mode]:
|
||||
|
||||
search_url = self.urls['search'] % re.sub('[\.\s]+', ' ', search_string)
|
||||
data_json = self.get_url(search_url, json=True)
|
||||
|
||||
cnt = len(results)
|
||||
try:
|
||||
for item in data_json['torrents']:
|
||||
seeders = ('seeds' in item and item['seeds']) or 0
|
||||
leechers = ('leeches' in item and item['leeches']) or 0
|
||||
if seeders < self.minseed or leechers < self.minleech:
|
||||
continue
|
||||
|
||||
title = ('torrent_title' in item and item['torrent_title']) or ''
|
||||
download_url = ('magnet_uri' in item and item['magnet_uri']) or ''
|
||||
if title and download_url:
|
||||
results.append((title, download_url, seeders))
|
||||
except Exception:
|
||||
pass
|
||||
self._log_result(mode, len(results) - cnt, search_url)
|
||||
|
||||
# Sort results by seeders
|
||||
results.sort(key=lambda tup: tup[2], reverse=True)
|
||||
|
||||
return results
|
||||
|
||||
def find_propers(self, search_date=datetime.datetime.today()):
|
||||
|
||||
return self._find_propers(search_date)
|
||||
|
||||
def _get_season_search_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return generic.TorrentProvider._get_season_search_strings(self, ep_obj, scene=False)
|
||||
|
||||
def _get_episode_search_strings(self, ep_obj, add_string='', **kwargs):
|
||||
|
||||
return generic.TorrentProvider._get_episode_search_strings(self, ep_obj, add_string, scene=False, use_or=False)
|
||||
|
||||
|
||||
provider = StrikeProvider()
|
Loading…
Reference in a new issue