From bd176a3e0d3cc00304b7da8e94b1d2ffa06c576e Mon Sep 17 00:00:00 2001 From: Dario Date: Sat, 2 Nov 2019 10:57:31 +0100 Subject: [PATCH] Fix BTDB manual search & update Xthor domain (#7303) * Fix BTDB manual search * Update Xthor domain * Update changelog --- CHANGELOG.md | 1 + medusa/providers/torrent/html/btdb.py | 9 +++++---- medusa/providers/torrent/json/xthor.py | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18fd00d5b1..4d15713c48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - Fixed provider bj-share due to layout changes ([#7250](https://github.com/pymedusa/Medusa/pull/7250)) - Fixed provider btdb due date format change in layout ([#7250](https://github.com/pymedusa/Medusa/pull/7250)) - Fixed exception when there is no anime XML ([#7256](https://github.com/pymedusa/Medusa/pull/7256)) +- Fixed BTDB manual search & updated Xthor domain ([#7303](https://github.com/pymedusa/Medusa/pull/7303)) ----- diff --git a/medusa/providers/torrent/html/btdb.py b/medusa/providers/torrent/html/btdb.py index 53384a563d..d04d171d5d 100644 --- a/medusa/providers/torrent/html/btdb.py +++ b/medusa/providers/torrent/html/btdb.py @@ -5,6 +5,7 @@ from __future__ import unicode_literals import logging +from collections import OrderedDict from medusa import tv from medusa.bs4_parser import BS4Parser @@ -51,9 +52,7 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): results = [] # Search Params - search_params = { - 'category': 'show', - } + search_params = OrderedDict() for mode in search_strings: log.debug('Search mode: {0}', mode) @@ -64,11 +63,13 @@ def search(self, search_strings, age=0, ep_obj=None, **kwargs): if mode != 'RSS': search_url = self.url - search_params['search'] = search_string + search_params['s'] = search_string search_params['sort'] = 'popular' log.debug('Search string: {search}', {'search': search_string}) + else: + search_params['category'] = 'show' response = self.session.get(search_url, params=search_params) if not response or not response.text: diff --git a/medusa/providers/torrent/json/xthor.py b/medusa/providers/torrent/json/xthor.py index ef25495696..b1e3161367 100644 --- a/medusa/providers/torrent/json/xthor.py +++ b/medusa/providers/torrent/json/xthor.py @@ -26,9 +26,9 @@ def __init__(self): self.passkey = None # URLs - self.url = 'https://xthor.to' + self.url = 'https://xthor.tk' self.urls = { - 'search': 'https://api.xthor.to', + 'search': 'https://api.xthor.tk', } # Proper Strings