Skip to content

Commit bb99942

Browse files
Merge pull request #532 from richardli1598/dev
fix: fix xunlei download
2 parents a48571f + 75dd2af commit bb99942

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

kubespider/api/values.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@ class Task(Extra):
9999

100100
def __init__(self, url: str, path: str, link_type: str = None, **kwargs) -> None:
101101
super().__init__(**kwargs)
102+
# url is the download url or torrent file path
103+
# For example: http://xxx.com/x.jpg or /tmp/a.torrent
102104
self.url = url
105+
# Path is the path to save the file, like /Movie
103106
self.path = path
104107
self.link_type = link_type
105108
self.uid = None

kubespider/download_provider/xunlei_download_provider/provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def send_torrent_task(self, task: Task) -> TypeError:
4949
token = self.get_pan_token()
5050
if token == "":
5151
return None
52-
magnet_url = self.convert_torrent_to_magnet(task.path)
52+
magnet_url = self.convert_torrent_to_magnet(task.url)
5353
file_info = self.list_files(token, magnet_url)
5454
return self.send_task(token, file_info, magnet_url, task.path)
5555

0 commit comments

Comments
 (0)