gboudreau / sabconnectplusplus

SABnzbd extension for Google Chrome
GNU General Public License v3.0
77 stars 44 forks source link

save nzb to temporary location and upload afterwards #112

Open dakky opened 10 years ago

dakky commented 10 years ago

Hello

it would be awesome, if u could add an option, which dowloads the nzb first and uploads the file after that to sabnzbd. When trying to upload a file from a "protected" location (eg. a board/forum) the nzb becomes broken/empty(?). So a workaround might be to download the nzb with Chrome to a local location (so that the brower uses the cookies/credentials/whatever for downloading) and upload it afterwards to sabnzbd.

Greetings Dakky

ppslim commented 10 years ago

Is there any reason you are not just saving the NZB into a folder (normally a shared remote one) that is your Sab watch directory?

dakky commented 10 years ago

Its not this trivial: the shared folder is not accessable from all clients which use sab (eg mobile) And nfs shares from unixoid hosts would be possible, but the overhead is quite high (eg using vpn to protect uncrypted nfs traffic).

gboudreau commented 10 years ago

Chrome doesn't offer any API to handle downloads, so extensions can't intercept them, or in any way automate something related to downloads. I think we can see the HTTP request made for downloads, and we could log it (including the cookies used), but SABnzbd doesn't support cookies, so that wouldn't help either.

ppslim commented 10 years ago

This is certainly achievable. It would actually suit the "Send link to SABnzbd" context menu better than the current mechanism, as the XHR in the web worker would carry the cookies in the page context.

http://stackoverflow.com/a/10002486

gboudreau commented 10 years ago

Cool. Didn't know it was possible. Leaving open then, in case someone wants to implement it.