feat: New wiki

This commit is contained in:
EstrellaXD
2023-05-21 14:03:35 +08:00
parent 4b4865ff20
commit bd956d8c42
2 changed files with 7 additions and 4 deletions

View File

@@ -67,8 +67,8 @@ class QbDownloader:
return self._client.torrents_createCategory(name=category)
@qb_connect_failed_wait
def torrents_info(self, status_filter, category):
return self._client.torrents_info(status_filter, category)
def torrents_info(self, status_filter, category, tag=None):
return self._client.torrents_info(status_filter=status_filter, category=category, tag=tag)
def torrents_add(self, urls, save_path, category):
return self._client.torrents_add(
@@ -125,3 +125,6 @@ class QbDownloader:
def remove_rule(self, rule_name):
self._client.rss_remove_rule(rule_name)
def add_tag(self, _hash, tag):
self._client.torrents_add_tags(tags=tag, hashes=_hash)

View File

@@ -90,8 +90,8 @@ class DownloadClient(TorrentPath):
self.set_rule(info)
logger.debug("Finished.")
def get_torrent_info(self, category="Bangumi"):
return self.client.torrents_info(status_filter="completed", category=category)
def get_torrent_info(self, category="Bangumi", status_filter="completed", tags=None):
return self.client.torrents_info(status_filter=status_filter, category=category, tags=tags)
def rename_torrent_file(self, _hash, old_path, new_path) -> bool:
logger.info(f"{old_path} >> {new_path}")