Skip to content

Commit

Permalink
Fix BTDB manual search & update Xthor domain (#7303)
Browse files Browse the repository at this point in the history
* Fix BTDB manual search

* Update Xthor domain

* Update changelog
  • Loading branch information
medariox authored Nov 2, 2019
1 parent ebf4a92 commit bd176a3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
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

0 comments on commit bd176a3

Please sign in to comment.