mirror of
https://github.com/SickGear/SickGear.git
synced 2024-11-15 01:15:05 +00:00
Update UnRar x64 for Windows 6.21 → 6.22
Change allow Python 3.11.4 Change minimum required Python to version 3.8.2 Change remove Python 2 references from init scripts. Remove provider Rarbg.
This commit is contained in:
parent
db58a3c26c
commit
b9bcf6df6b
10 changed files with 20 additions and 202 deletions
11
CHANGES.md
11
CHANGES.md
|
@ -1,4 +1,13 @@
|
||||||
### 3.29.2 (2023-05-28 07:45:00 UTC)
|
### 3.29.3 (2023-05-31 13:30:00 UTC)
|
||||||
|
|
||||||
|
* Update UnRar x64 for Windows 6.21 to 6.22
|
||||||
|
* Change allow Python 3.11.4
|
||||||
|
* Change minimum required Python to version 3.8.2
|
||||||
|
* Change remove Python 2 references from init-scripts
|
||||||
|
* Remove provider Rarbg
|
||||||
|
|
||||||
|
|
||||||
|
### 3.29.2 (2023-05-28 07:45:00 UTC)
|
||||||
|
|
||||||
* Fix find show results returned as newest/oldest that are then sorted z to a
|
* Fix find show results returned as newest/oldest that are then sorted z to a
|
||||||
* Fix add show "TheTVDB via Trakt"
|
* Fix add show "TheTVDB via Trakt"
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 580 B |
|
@ -12,7 +12,7 @@
|
||||||
# SICKGEAR_USER=<user you want sickgear to run under>
|
# SICKGEAR_USER=<user you want sickgear to run under>
|
||||||
# SICKGEAR_GROUP=<group you want sickgear to run under>
|
# SICKGEAR_GROUP=<group you want sickgear to run under>
|
||||||
# SICKGEAR_DIR=<path to sickgear.py>
|
# SICKGEAR_DIR=<path to sickgear.py>
|
||||||
# PATH_TO_PYTHON_2=/usr/bin/python2
|
# PATH_TO_PYTHON=/usr/bin/python
|
||||||
# SICKGEAR_DATADIR=<directory that contains sickbeard.db file>
|
# SICKGEAR_DATADIR=<directory that contains sickbeard.db file>
|
||||||
# SICKGEAR_CONFDIR=<directory that contains SickGear's config.ini file>
|
# SICKGEAR_CONFDIR=<directory that contains SickGear's config.ini file>
|
||||||
#
|
#
|
||||||
|
@ -49,7 +49,7 @@ start() {
|
||||||
--name sickgear \
|
--name sickgear \
|
||||||
--background \
|
--background \
|
||||||
--pidfile $(get_pidfile) \
|
--pidfile $(get_pidfile) \
|
||||||
--exec ${PATH_TO_PYTHON_2} \
|
--exec ${PATH_TO_PYTHON} \
|
||||||
-- \
|
-- \
|
||||||
${SICKGEAR_DIR}/sickgear.py \
|
${SICKGEAR_DIR}/sickgear.py \
|
||||||
-d \
|
-d \
|
||||||
|
|
|
@ -22,12 +22,12 @@
|
||||||
|
|
||||||
### Example Using simple
|
### Example Using simple
|
||||||
# Type=simple
|
# Type=simple
|
||||||
# ExecStart=/usr/bin/python2 /opt/sickgear/app/sickgear.py -q --nolaunch
|
# ExecStart=/usr/bin/python /opt/sickgear/app/sickgear.py -q --nolaunch
|
||||||
|
|
||||||
### Example Using simple with EnvironmentFile where SB_DATA=/home/sickgear/.sickgear in /etc/sickgear.conf
|
### Example Using simple with EnvironmentFile where SB_DATA=/home/sickgear/.sickgear in /etc/sickgear.conf
|
||||||
# Type=simple
|
# Type=simple
|
||||||
# EnvironmentFile=/etc/sickgear.conf
|
# EnvironmentFile=/etc/sickgear.conf
|
||||||
# ExecStart=/usr/bin/python2 /opt/sickgear/app/sickgear.py -q --nolaunch --datadir=${SB_DATA}
|
# ExecStart=/usr/bin/python /opt/sickgear/app/sickgear.py -q --nolaunch --datadir=${SB_DATA}
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -36,9 +36,9 @@ warnings.filterwarnings('ignore', module=r'.*ssl_.*', message='.*SSLContext obje
|
||||||
warnings.filterwarnings('ignore', module=r'.*zoneinfo.*', message='.*file or directory.*')
|
warnings.filterwarnings('ignore', module=r'.*zoneinfo.*', message='.*file or directory.*')
|
||||||
warnings.filterwarnings('ignore', message='.*deprecated in cryptography.*')
|
warnings.filterwarnings('ignore', message='.*deprecated in cryptography.*')
|
||||||
|
|
||||||
versions = [((3, 8, 0), (3, 8, 16)),
|
versions = [((3, 8, 2), (3, 8, 16)),
|
||||||
((3, 9, 0), (3, 9, 2)), ((3, 9, 4), (3, 9, 16)),
|
((3, 9, 0), (3, 9, 2)), ((3, 9, 4), (3, 9, 16)),
|
||||||
((3, 10, 0), (3, 11, 3))] # inclusive version ranges
|
((3, 10, 0), (3, 11, 4))] # inclusive version ranges
|
||||||
if not any(list(map(lambda v: v[0] <= sys.version_info[:3] <= v[1], versions))) and not int(os.environ.get('PYT', 0)):
|
if not any(list(map(lambda v: v[0] <= sys.version_info[:3] <= v[1], versions))) and not int(os.environ.get('PYT', 0)):
|
||||||
major, minor, micro = sys.version_info[:3]
|
major, minor, micro = sys.version_info[:3]
|
||||||
print('Python %s.%s.%s detected.' % (major, minor, micro))
|
print('Python %s.%s.%s detected.' % (major, minor, micro))
|
||||||
|
|
|
@ -40,7 +40,7 @@ __all__ = [
|
||||||
'hdbits', 'hdspace', 'hdtorrents',
|
'hdbits', 'hdspace', 'hdtorrents',
|
||||||
'immortalseed', 'iptorrents', 'limetorrents', 'magnetdl', 'milkie', 'morethan', 'nebulance', 'ncore', 'nyaa',
|
'immortalseed', 'iptorrents', 'limetorrents', 'magnetdl', 'milkie', 'morethan', 'nebulance', 'ncore', 'nyaa',
|
||||||
'pretome', 'privatehd', 'ptf',
|
'pretome', 'privatehd', 'ptf',
|
||||||
'rarbg', 'revtt', 'scenehd', 'scenetime', 'shazbat', 'showrss', 'snowfl', 'speedapp', 'speedcd',
|
'revtt', 'scenehd', 'scenetime', 'shazbat', 'showrss', 'snowfl', 'speedapp', 'speedcd',
|
||||||
'thepiratebay', 'torlock', 'torrentday', 'torrenting', 'torrentleech', 'tvchaosuk',
|
'thepiratebay', 'torlock', 'torrentday', 'torrenting', 'torrentleech', 'tvchaosuk',
|
||||||
'xspeeds',
|
'xspeeds',
|
||||||
# anime
|
# anime
|
||||||
|
|
|
@ -734,7 +734,7 @@ class GenericProvider(object):
|
||||||
def is_public_access(self):
|
def is_public_access(self):
|
||||||
# type: (...) -> bool
|
# type: (...) -> bool
|
||||||
try:
|
try:
|
||||||
return bool(re.search('(?i)rarbg|sick|anizb', self.name)) \
|
return bool(re.search('(?i)sick|anizb', self.name)) \
|
||||||
or False is bool(('_authorised' in self.__class__.__dict__ or hasattr(self, 'digest')
|
or False is bool(('_authorised' in self.__class__.__dict__ or hasattr(self, 'digest')
|
||||||
or self._check_auth(is_required=True)))
|
or self._check_auth(is_required=True)))
|
||||||
except AuthException:
|
except AuthException:
|
||||||
|
@ -1053,8 +1053,7 @@ class GenericProvider(object):
|
||||||
[quote_plus(tr) for tr in (
|
[quote_plus(tr) for tr in (
|
||||||
'http://atrack.pow7.com/announce', 'http://mgtracker.org:2710/announce',
|
'http://atrack.pow7.com/announce', 'http://mgtracker.org:2710/announce',
|
||||||
'http://pow7.com/announce', 'http://t1.pow7.com/announce',
|
'http://pow7.com/announce', 'http://t1.pow7.com/announce',
|
||||||
'http://tracker.tfile.me/announce', 'udp://9.rarbg.com:2710/announce',
|
'http://tracker.tfile.me/announce',
|
||||||
'udp://9.rarbg.me:2710/announce', 'udp://9.rarbg.to:2710/announce',
|
|
||||||
'udp://eddie4.nl:6969/announce', 'udp://explodie.org:6969/announce',
|
'udp://eddie4.nl:6969/announce', 'udp://explodie.org:6969/announce',
|
||||||
'udp://inferno.demonoid.pw:3395/announce', 'udp://inferno.subdemon.com:3395/announce',
|
'udp://inferno.demonoid.pw:3395/announce', 'udp://inferno.subdemon.com:3395/announce',
|
||||||
'udp://ipv4.tracker.harry.lu:80/announce', 'udp://p4p.arenabg.ch:1337/announce',
|
'udp://ipv4.tracker.harry.lu:80/announce', 'udp://p4p.arenabg.ch:1337/announce',
|
||||||
|
|
|
@ -1,190 +0,0 @@
|
||||||
# coding=utf-8
|
|
||||||
#
|
|
||||||
# Author: SickGear
|
|
||||||
#
|
|
||||||
# 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 datetime
|
|
||||||
import re
|
|
||||||
import time
|
|
||||||
|
|
||||||
from . import generic
|
|
||||||
from .. import logger
|
|
||||||
from ..indexers.indexer_config import TVINFO_TVDB
|
|
||||||
|
|
||||||
from six import iteritems
|
|
||||||
|
|
||||||
|
|
||||||
class RarbgProvider(generic.TorrentProvider):
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
generic.TorrentProvider.__init__(self, 'Rarbg')
|
|
||||||
|
|
||||||
self.url_home = ['https://rarbgmirror.xyz/']
|
|
||||||
# api_spec: https://rarbg.com/pubapi/apidocs_v2.txt
|
|
||||||
self.url_api = 'https://torrentapi.org/pubapi_v2.php?app_id=SickGear&'
|
|
||||||
self.url_tmpl = {'config_provider_home_uri': '%(home)s'}
|
|
||||||
self.urls = {'api_token': self.url_api + 'get_token=get_token',
|
|
||||||
'api_list': self.url_api + 'mode=list',
|
|
||||||
'api_search': self.url_api + 'mode=search'}
|
|
||||||
|
|
||||||
self.params = {'defaults': '&format=json_extended&category=18;41;49&limit=100&sort=last&ranked={r}&token={t}',
|
|
||||||
'param_iid': '&search_imdb=%(sid)s',
|
|
||||||
'param_tid': '&search_tvdb=%(sid)s',
|
|
||||||
'param_str': '&search_string=%(str)s',
|
|
||||||
'param_seed': '&min_seeders=%(min_seeds)s',
|
|
||||||
'param_peer': '&min_leechers=%(min_peers)s'}
|
|
||||||
|
|
||||||
self.proper_search_terms = '{{.proper.|.repack.}}'
|
|
||||||
|
|
||||||
self.minseed, self.minleech, self.token, self.token_expiry = 4 * [None]
|
|
||||||
self.confirmed = False
|
|
||||||
self.request_throttle = datetime.datetime.now()
|
|
||||||
|
|
||||||
def _authorised(self, reset=False, **kwargs):
|
|
||||||
|
|
||||||
if not reset and self.token and self.token_expiry and datetime.datetime.now() < self.token_expiry:
|
|
||||||
return True
|
|
||||||
|
|
||||||
for r in range(0, 3):
|
|
||||||
response = self.get_url(self.urls['api_token'], parse_json=True)
|
|
||||||
if not self.should_skip() and response and 'token' in response:
|
|
||||||
self.token = response['token']
|
|
||||||
self.token_expiry = datetime.datetime.now() + datetime.timedelta(minutes=14)
|
|
||||||
time.sleep(2)
|
|
||||||
return True
|
|
||||||
time.sleep(2)
|
|
||||||
|
|
||||||
logger.error(f'No usable API token returned from: {self.urls["api_token"]}')
|
|
||||||
return False
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def _has_signature(data=None):
|
|
||||||
return data and re.search(r'(?i)<title[^<]+?(rarbg)', data)
|
|
||||||
|
|
||||||
def _search_provider(self, search_params, **kwargs):
|
|
||||||
|
|
||||||
results = []
|
|
||||||
if not self._authorised(reset=True):
|
|
||||||
return results
|
|
||||||
|
|
||||||
items = {'Cache': [], 'Season': [], 'Episode': [], 'Propers': []}
|
|
||||||
|
|
||||||
id_search = None
|
|
||||||
if hasattr(self, 'show_obj') and self.show_obj and self.show_obj.tvid and self.show_obj.prodid:
|
|
||||||
sid, search_with = 2 * [None]
|
|
||||||
if 0 < len(self.show_obj.imdb_info):
|
|
||||||
sid = self.show_obj.imdb_info['imdb_id']
|
|
||||||
search_with = 'param_iid'
|
|
||||||
elif TVINFO_TVDB == self.show_obj.tvid:
|
|
||||||
sid = self.show_obj.prodid
|
|
||||||
search_with = 'param_tid'
|
|
||||||
|
|
||||||
if sid and search_with:
|
|
||||||
id_search = self.params[search_with] % {'sid': sid}
|
|
||||||
|
|
||||||
dedupe = []
|
|
||||||
# sort type "_only" as first to process
|
|
||||||
search_types = sorted([x for x in iteritems(search_params)], key=lambda tup: tup[0], reverse=True)
|
|
||||||
for mode_params in search_types:
|
|
||||||
mode_search = mode_params[0]
|
|
||||||
mode = mode_search.replace('_only', '')
|
|
||||||
for search_string in mode_params[1]:
|
|
||||||
searched_url = search_url = ''
|
|
||||||
url = 'api_list'
|
|
||||||
if 'Cache' != mode_search:
|
|
||||||
url = 'api_search'
|
|
||||||
|
|
||||||
if '_only' in mode_search and id_search:
|
|
||||||
search_url = id_search
|
|
||||||
|
|
||||||
if None is not search_string:
|
|
||||||
search_url += self.params['param_str'] % {'str': search_string}
|
|
||||||
|
|
||||||
search_url = self.urls[url] + self.params['defaults'] + search_url
|
|
||||||
|
|
||||||
if self.minseed:
|
|
||||||
search_url += self.params['param_seed'] % {'min_seeds': self.minseed}
|
|
||||||
|
|
||||||
if self.minleech:
|
|
||||||
search_url += self.params['param_peer'] % {'min_peers': self.minleech}
|
|
||||||
|
|
||||||
data_json = {}
|
|
||||||
cnt = len(items[mode])
|
|
||||||
for r in range(0, 3):
|
|
||||||
time_out = 0
|
|
||||||
while(self.request_throttle > datetime.datetime.now()) and 2 >= time_out:
|
|
||||||
time_out += 1
|
|
||||||
time.sleep(1)
|
|
||||||
|
|
||||||
searched_url = search_url.format(**{'r': int(self.confirmed), 't': self.token})
|
|
||||||
|
|
||||||
data_json = self.get_url(searched_url, parse_json=True)
|
|
||||||
if self.should_skip():
|
|
||||||
return results
|
|
||||||
|
|
||||||
self.token_expiry = datetime.datetime.now() + datetime.timedelta(minutes=14)
|
|
||||||
self.request_throttle = datetime.datetime.now() + datetime.timedelta(seconds=3)
|
|
||||||
if not data_json:
|
|
||||||
continue
|
|
||||||
|
|
||||||
if 'error' in data_json:
|
|
||||||
if 5 == data_json['error_code']: # Too many requests per second.
|
|
||||||
continue
|
|
||||||
|
|
||||||
elif 2 == data_json['error_code']: # Invalid token set
|
|
||||||
if self._authorised(reset=True):
|
|
||||||
continue
|
|
||||||
self.log_result(mode, len(items[mode]) - cnt, searched_url)
|
|
||||||
return items[mode]
|
|
||||||
break
|
|
||||||
|
|
||||||
if 'error' not in data_json:
|
|
||||||
for item in data_json['torrent_results']:
|
|
||||||
title, download_magnet, seeders, size = [
|
|
||||||
item.get(x) for x in ('title', 'download', 'seeders', 'size')]
|
|
||||||
title = None is title and item.get('filename') or title
|
|
||||||
if not (title and download_magnet) or download_magnet in dedupe:
|
|
||||||
continue
|
|
||||||
dedupe += [download_magnet]
|
|
||||||
|
|
||||||
items[mode].append((title, download_magnet, seeders, self._bytesizer(size)))
|
|
||||||
|
|
||||||
self._log_search(mode, len(items[mode]) - cnt, searched_url)
|
|
||||||
|
|
||||||
results = self._sort_seeding(mode, results + items[mode])
|
|
||||||
|
|
||||||
if '_only' in mode_search and len(results):
|
|
||||||
break
|
|
||||||
|
|
||||||
return results
|
|
||||||
|
|
||||||
def _season_strings(self, ep_obj, **kwargs):
|
|
||||||
|
|
||||||
return generic.TorrentProvider._season_strings(self, ep_obj, detail_only=True)
|
|
||||||
|
|
||||||
def _episode_strings(self, ep_obj, **kwargs):
|
|
||||||
|
|
||||||
search_params = super(RarbgProvider, self)._episode_strings(ep_obj, detail_only=True, date_or=True, **kwargs)
|
|
||||||
if self.show_obj.air_by_date and self.show_obj.is_sports:
|
|
||||||
for x, types in enumerate(search_params):
|
|
||||||
for y, ep_type in enumerate(types):
|
|
||||||
search_params[x][ep_type][y] = '{{%s}}' % search_params[x][ep_type][y]
|
|
||||||
|
|
||||||
return search_params
|
|
||||||
|
|
||||||
|
|
||||||
provider = RarbgProvider()
|
|
|
@ -1 +1 @@
|
||||||
3.8
|
3.8.2
|
Loading…
Reference in a new issue