Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synology Download station 3.8.16-3566 #303

Open
bigbuzzer opened this issue Mar 27, 2021 · 7 comments
Open

Synology Download station 3.8.16-3566 #303

bigbuzzer opened this issue Mar 27, 2021 · 7 comments

Comments

@bigbuzzer
Copy link

After update of Synology Download station to version 3.8.16-3566 including
https://www.synology.com/en-global/security/advisory/Synology_SA_21_11

Send to now gives the following error
DownloadStation: Response to the POST request is {"error":{"code":101},"success":false}

@bogenpirat
Copy link
Owner

similarly to #227, i don't own a synology download station and thus unfortunately cannot investigate/run tests/fix this. pull requests are appreciated, if you can somehow get me access to one of these devices, i can mess around with it.

i don't remember how the present code came into existence, i assume it was a pull request or someone gave me access. in any case, this file needs fixing: https://github.com/bogenpirat/remote-torrent-adder/blob/master/webuiapis/SynologyWebUI.js

closing this for now, will re-open if anything related to it happens.

@bigbuzzer
Copy link
Author

Hi, SickChill had the same issues. Changes in the API called for putting the file in qoutes '"file"' and the destination is now required it would seem like.

https://github.com/SickChill/SickChill/issues/7062

{'api': 'SYNO.DownloadStation2.Task', 'version': '2', 'method': 'create', 'session': 'DownloadStation', 'url': 'magnet:?xt=urn:btih:F72B8AC6026&dn=The+Walking+Dead&tr=http://tracker/announce', 'type': 'url', 'create_list': 'false', 'destination': 'Media/Download'}

@bogenpirat
Copy link
Owner

bogenpirat commented Apr 12, 2021

uh... alright.

so you're saying:

  1. auth v3 as-is in 55fdb5d
  2. .torrent file upload: api=SYNO.DownloadStation2.Task and version=2 instead of SYNO.DownloadStation.Task and version=3
  3. file parameter is actually called "file" parameter
  4. magnet as-is in 55fdb5d

does that sound about right? i'm willing to implement this, just wanna clear up what exactly supposedly works.

PS: this is reopened in response to #304

@bogenpirat bogenpirat reopened this Apr 12, 2021
@bigbuzzer
Copy link
Author

Yes, and it looks like the destination (which is the Synology share path to store the downloaded file) also needs to be included.

@bogenpirat
Copy link
Owner

the destination (which is the Synology share path to store the downloaded file) also needs to be included.

so this is something the user has to enter individually, yes? no default values i can hardcode?
if this is the case, i'd prefer to create an optional setting in the RTA server config.

@bigbuzzer
Copy link
Author

Yes, setting per NAS

@bogenpirat
Copy link
Owner

okay, give f838db5 (+fix) a go. zip.

  • hardcoded version=2 back into the v2 post body
  • changed the v3 post uri - the sickchill commit shows a different endpoint for SYNO.DownloadStation2.Task
  • added a destination path setting in RTA's server settings - required for v3(?)
  • changed the session parameter name for v3 - it was _sid in v2, from sickchill's code it seems to be session.

PS: this comment is killing me. i don't enjoy writing code like this at all - against a seemingly poorly-designed endpoint without any way of testing it. i really hope it works. if it doesn't, perhaps you can dick around a bit with it, or at least the error responses are readable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants