-
-
Notifications
You must be signed in to change notification settings - Fork 601
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
Changes from 5 commits
2586da1
e3e3563
ebf390a
d1fcd43
fa7b8f4
ac230fb
9cde86b
e687e18
dbff63f
b49f6a9
98e7037
92567bc
7d86a46
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -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 | ||||||||||||||||||||||||||||||||||||
|
@@ -43,15 +43,18 @@ 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, | ||||||||||||||||||||||||||||||||||||
download_path=settings.TORRENT_PATH_INCOMPLETE or None, | ||||||||||||||||||||||||||||||||||||
category=(settings.TORRENT_LABEL, settings.TORRENT_LABEL_ANIME)[result.show.is_anime] or settings.TORRENT_LABEL, | ||||||||||||||||||||||||||||||||||||
is_paused=settings.TORRENT_PAUSED, | ||||||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The - category=(settings.TORRENT_LABEL, settings.TORRENT_LABEL_ANIME)[result.show.is_anime] or settings.TORRENT_LABEL,
+ category=settings.TORRENT_LABEL_ANIME if result.show.is_anime else settings.TORRENT_LABEL, Commitable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
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"): | ||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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.