diff --git a/CHANGES.md b/CHANGES.md index 2d44134..a5cfedf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,11 @@ -### 0.20.15 (2019-12-23 22:40:00 UTC) +### 0.20.16 (2019-12-25 00:40:00 UTC) + +* Fix SkyTorrents provider +* Fix download link quote url process +* Fix remove Synology DownloadStation test dev mode + + +### 0.20.15 (2019-12-23 22:40:00 UTC) * Change overhaul qBittorrent 4.2.1 client to add compatibility for breaking API 2.4 * Add search setting for qBittorrent client "Start torrent paused" diff --git a/sickbeard/clients/download_station.py b/sickbeard/clients/download_station.py index e654a68..0e75735 100644 --- a/sickbeard/clients/download_station.py +++ b/sickbeard/clients/download_station.py @@ -37,12 +37,6 @@ class DownloadStationAPI(GenericClient): self.url = self.url_base + 'DownloadStation/task.cgi' self._errmsg = None - self._testmode = int(sickbeard.ENV.get('DEVENV')) - if self._testmode: - from download_station_data import client_data - self._testdata, self.auth, self._task_version = client_data, '1234', 3 - self._testid = 'dbid_3185' - common_errors = { -1: 'Could not get a response', 100: 'Unknown error', 101: 'Invalid parameter', 102: 'The requested API does not exist', 103: 'The requested method does not exist', diff --git a/sickbeard/providers/generic.py b/sickbeard/providers/generic.py index d37d85d..5bfa925 100644 --- a/sickbeard/providers/generic.py +++ b/sickbeard/providers/generic.py @@ -810,12 +810,12 @@ class GenericProvider(object): url = url.encode('utf-8') except (BaseException, Exception): pass - url = quote(url).strip().replace('&', '&') + url = url.strip().replace('&', '&') if not url: url = '' return url if re.match('(?i)(https?://|magnet:)', url) \ else (url_tmpl or self.urls.get('get', (getattr(self, 'url', '') or - getattr(self, 'url_base')) + '%s')) % url.lstrip('/') + getattr(self, 'url_base')) + '%s')) % quote(url).lstrip('/') @staticmethod def _header_row(table_row, custom_match=None, custom_tags=None, header_strip=''): diff --git a/sickbeard/providers/skytorrents.py b/sickbeard/providers/skytorrents.py index cb5c582..ff19a9a 100644 --- a/sickbeard/providers/skytorrents.py +++ b/sickbeard/providers/skytorrents.py @@ -84,10 +84,10 @@ class SkytorrentsProvider(generic.TorrentProvider): continue info = tr.select_one( - '[alt*="magnet"], [title*="magnet"], [alt*="torrent"], [title*="torrent"]') \ + '[alt*="magnet"], [title*="magnet"]') \ or tr.find('a', href=rc['info']) - title = re.sub(r'\s(using|use|magnet|link)', '', ( - info.attrs.get('title') or info.attrs.get('alt') or info.get_text())).strip() + title = re.sub(r'(^www\.\w+\.\w{3}\s[^0-9A-Za-z]\s|\s(using|use|magnet|link))', '', ( + info.attrs.get('title') or info.attrs.get('alt'))).strip() download_url = self._link(tr.find('a', href=rc['get'])['href']) except (AttributeError, TypeError, ValueError, KeyError): continue