Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BTDB manual search & update Xthor domain #7303

Merged
merged 3 commits into from
Nov 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))

-----

Expand Down
9 changes: 5 additions & 4 deletions medusa/providers/torrent/html/btdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions medusa/providers/torrent/json/xthor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down