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

Maintain scheme when building the qBittorrent client #8731

Merged
merged 2 commits into from
Mar 8, 2024
Merged
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
11 changes: 6 additions & 5 deletions sickchill/oldbeard/clients/qbittorrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@


class Client(GenericClient):
def __init__(self, host: str = None, username: str = None, password: str = None):
super().__init__("qBittorrent", host, username, password)
parsed_url = urlparse(self.host or settings.TORRENT_HOST)
self.host = parsed_url.hostname
def __init__(self, url: str = None, username: str = None, password: str = None):
super().__init__("qBittorrent", url, username, password)
parsed_url = urlparse(self.url or settings.TORRENT_HOST)
self.url = parsed_url.geturl()
xelgand marked this conversation as resolved.
Show resolved Hide resolved
self.port = parsed_url.port
logger.debug(f"qBittorrent URL: {self.url}")
self.api = qbittorrentapi.Client(
host=self.host,
host=self.url,
port=self.port or None,
username=self.username or settings.TORRENT_USERNAME,
password=self.password or settings.TORRENT_PASSWORD,
Expand Down
Loading