forked from EstrellaXD/Auto_Bangumi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update download client: could auto reconnect
- Loading branch information
Showing
42 changed files
with
786 additions
and
677 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from .download_client import DownloadClient | ||
from .download_client import Client, DownloadClient | ||
from .download_queue import AsyncDownloadController, DownloadQueue | ||
|
||
__all__ = ["DownloadClient", "DownloadQueue","AsyncDownloadController"] | ||
__all__ = ["DownloadClient", "DownloadQueue","AsyncDownloadController","Client"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
from abc import ABCMeta, abstractmethod | ||
|
||
|
||
# 主要实现以下 个功能 | ||
# 1. renamer,用以实现重命名功能 hash, old name, new name | ||
# 2. move, 用以实现改数据后的转移 | ||
# 3. add, 用以加种子 | ||
# 4. get_info, 获取当前所有的有关种子 | ||
# 5. auth, 用以登陆 | ||
# 6. check_host, 用以检查连通性 | ||
# 7. logout,用以登出 | ||
# | ||
class BaseDownloader(metaclass=ABCMeta): | ||
@abstractmethod | ||
async def auth(self): | ||
pass | ||
|
||
@abstractmethod | ||
async def check_host(self): | ||
pass | ||
|
||
@abstractmethod | ||
async def logout(self): | ||
pass | ||
|
||
@abstractmethod | ||
async def get_torrent_files(self, hash): | ||
pass | ||
@abstractmethod | ||
async def torrents_info(self, status_filter , category , tag, limit): | ||
pass | ||
|
||
@abstractmethod | ||
async def rename(self, torrent_hash,old_path, new_path): | ||
pass | ||
@abstractmethod | ||
async def move(self, hashes, new_location): | ||
pass | ||
@abstractmethod | ||
async def add(self, torrent_urls, torrent_files, save_path, category): | ||
pass | ||
@abstractmethod | ||
async def delete(self, hashes): | ||
pass | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.