bogenpirat / remote-torrent-adder

A handy Chrome extension to add torrent files to torrent clients
237 stars 80 forks source link

Update SynologyWebUI.js #304

Open bigbuzzer opened 3 years ago

bigbuzzer commented 3 years ago

Update for Synology Download station after update March 2021

bogenpirat commented 3 years ago

hey, thanks for your quick work!

changing the version number already fixes #303? cool.

any clue whether it's a good idea to create a separate new client so that older versions of the DSM can still be used?

bigbuzzer commented 3 years ago

Using the following URL http://nasip:5000/webapi/query.cgi?api=SYNO.API.Info&version=1&method=query&query=SYNO.API.Auth,SYNO.DownloadStation.Task

This is the output: {"data":{"SYNO.API.Auth":{"maxVersion":6,"minVersion":1,"path":"auth.cgi"},"SYNO.DownloadStation.Task":{"maxVersion":3,"minVersion":1,"path":"DownloadStation/task.cgi"}},"success":true}

Might be a custom field could allow for a config of some kind, not sure on this sorry...

bogenpirat commented 3 years ago

good idea - i implemented something like that based on this PR in https://github.com/bogenpirat/remote-torrent-adder/commit/b02a83c3b9f92be56a687bb3a55463fcf2a96dd3. there's now an API version selection in the options of RTA. standard is v2 so as to not break existing configs.

are you in a position to test this code?

here's a zip: https://github.com/bogenpirat/remote-torrent-adder/archive/b02a83c3b9f92be56a687bb3a55463fcf2a96dd3.zip here's instructions: https://github.com/bogenpirat/remote-torrent-adder/wiki/Try-new-code

bigbuzzer commented 3 years ago

Auth is working, but the create action still gives error 101

bogenpirat commented 3 years ago

right, missed one (55fdb5db9b8658e7165653504fab2ea078848d0c).

new zip: https://github.com/bogenpirat/remote-torrent-adder/archive/refs/heads/synology-v3.zip

mind testing .torrent and magnet links?

bigbuzzer commented 3 years ago

Magnet links works but .torrent still give the same error

bogenpirat commented 3 years ago

i'm confused. you did set the version setting in your server's config in RTA's options, yes? image

i've gone over it a few times now and tested the calls to the best of my abilities (don't have the hardware as i mentioned) and if the version from this PR works, mine should too. am i missing something? yours worked with torrent files, right?