N4S4 / synology-api

A Python wrapper around Synology API
MIT License
360 stars 137 forks source link

Is it possible to make download station create task utilizing torrent file? #117

Open CKopoer opened 1 year ago

CKopoer commented 1 year ago

I have tried long ago to make download station create task utilizing torrent file (from client or DSM) by python. But it seems that there are something wrong in DSM Download Station API document. I could create downloading task by url, but fail lots of times by torrent files. Have you solve this problem?

N4S4 commented 1 year ago

I don't recall having this issue, i was just reading a post in synology where task_create should be requested by GET and not POST.

I will have a look later on

CKopoer commented 1 year ago

I don't recall having this issue, i was just reading a post in synology where task_create should be requested by GET and not POST.

I will have a look later on

Right, I have substituted GET for POST, that's another error in that erroneous document XDDD. I have noticed downlaod station has been using SYNO.DownloadStation2.Task API while synology haven't release document for that version.

N4S4 commented 1 year ago

Interesting! Well I love synology but a lot of incorrect info in their api.

Lets see if I find something. However if you have already it working you can make a PR

jashanj0tsingh commented 1 year ago

@N4S4 By the way this could be related to why I can make FileStation object get the API list by simply updating the path but the DownloadStation object is not able to get the API list by simply updating the path only. I will try the 2 and see if it works for me!

N4S4 commented 1 year ago

Ok let me know, tomorrow I will do some testing and see whats wrong

N4S4 commented 1 year ago

@CKopoer so now I remember From synology download station docs on page 30:

Due to multipart upload limitations, creating tasks by uploading files should adhere to one of the following implementations:

  • a Set the upload files as the only POST request method data, and set other files as GET parameters.
  • b Se
  • c ‘t all the parameters as POST data, and the upload file should implement LAST parameters

not really clear but I will try to work on it and see what I get