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

QBT remove false link to torrent folder. #8628

Merged
merged 13 commits into from
Nov 24, 2023
3 changes: 2 additions & 1 deletion sickchill/gui/slick/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1949,7 +1949,8 @@ const SICKCHILL = {
$('#torrent_auth_type_option').show();
} else if (selectedProvider.toLowerCase() === 'qbittorrent') {
client = 'qBittorrent';
$('#torrent_path_option').hide();
$('#torrent_path_option').show();
$('#torrent_path_option').find('.fileBrowser').show();
$('#label_warning_qbittorrent').show();
$('#label_anime_warning_qbittorrent').show();
$('#torrent_verify_cert_option').show();
Expand Down
6 changes: 4 additions & 2 deletions sickchill/oldbeard/clients/qbittorrent.py
Copy link
Collaborator Author

@BKSteve BKSteve Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add this debug logging to others?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, this was added though when their API changes between dsm5 and 6 I think though. Up to you.

Copy link
Collaborator Author

@BKSteve BKSteve Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant add logging.debug for uT and rT etc. so there is some data if any of them aren't working.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By all means, if you think it might be helpful at another time for debugging go for it.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import qbittorrentapi

from sickchill import settings
from sickchill import logger, settings
from sickchill.oldbeard.clients.generic import GenericClient

if TYPE_CHECKING: # pragma: no cover
Expand Down Expand Up @@ -43,15 +43,17 @@ def test_client_connection(self):
@staticmethod
def __torrent_args(result: "TorrentSearchResult"):
return dict(
save_path=settings.TORRENT_DIR or None,
save_path=settings.TORRENT_PATH or None,
category=(settings.TORRENT_LABEL, settings.TORRENT_LABEL_ANIME)[result.show.is_anime] or settings.TORRENT_LABEL,
is_paused=settings.TORRENT_PAUSED,
)

def _add_torrent_uri(self, result: "TorrentSearchResult"):
logger.debug(f"Posted as url with {self.__torrent_args(result)}")
return self.api.torrents_add(urls=[result.url], **self.__torrent_args(result))

def _add_torrent_file(self, result: "TorrentSearchResult"):
logger.debug(f"Posted as file with {self.__torrent_args(result)}")
return self.api.torrents_add(torrent_files=[result.content], **self.__torrent_args(result))

def _set_torrent_priority(self, result: "TorrentSearchResult"):
Expand Down
Loading