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

Feature/downloadstation torrent path #9482

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft
Changes from 1 commit
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
Next Next commit
Add torrent_path to web handler
  • Loading branch information
p0psicles committed Apr 26, 2021
commit b13b33ea5a685b5f113714d610b33590d2bdb424
4 changes: 2 additions & 2 deletions medusa/server/web/home/handler.py
Original file line number Diff line number Diff line change
@@ -222,14 +222,14 @@ def testNZBget(host=None, username=None, password=None, use_https=False):
return 'Unable to connect to host'

@staticmethod
def testTorrent(torrent_method=None, host=None, username=None, password=None):
def testTorrent(torrent_method=None, host=None, username=None, password=None, torrent_path=None):
# @TODO: Move this to the validation section of each PATCH/PUT method for torrents
host = config.clean_url(host)

try:
client = torrent.get_client_class(torrent_method)

_, acces_msg = client(host, username, password).test_authentication()
_, acces_msg = client(host, username, password, torrent_path).test_authentication()
except Exception as error:
logger.log('Error while testing {torrent} connection: {error}'.format(
torrent=torrent_method or 'torrent', error=error), logger.WARNING)