Skip to content

Commit

Permalink
Merge pull request #532 from richardli1598/dev
Browse files Browse the repository at this point in the history
fix: fix xunlei download
  • Loading branch information
gitautomator[bot] authored Jun 26, 2024
2 parents a48571f + 75dd2af commit bb99942
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions kubespider/api/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ class Task(Extra):

def __init__(self, url: str, path: str, link_type: str = None, **kwargs) -> None:
super().__init__(**kwargs)
# url is the download url or torrent file path
# For example: http://xxx.com/x.jpg or /tmp/a.torrent
self.url = url
# Path is the path to save the file, like /Movie
self.path = path
self.link_type = link_type
self.uid = None
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def send_torrent_task(self, task: Task) -> TypeError:
token = self.get_pan_token()
if token == "":
return None
magnet_url = self.convert_torrent_to_magnet(task.path)
magnet_url = self.convert_torrent_to_magnet(task.url)
file_info = self.list_files(token, magnet_url)
return self.send_task(token, file_info, magnet_url, task.path)

Expand Down

0 comments on commit bb99942

Please sign in to comment.