gboudreau / sabconnectplusplus

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

nzbsrus.com "Send to SABnzbd" button broken #77

Open Overdose87 opened 11 years ago

Overdose87 commented 11 years ago

Untitled When trying to download the file i get this message: Could not find result using the api

Kietunes commented 11 years ago

Also getting this same error as of yesterday.

It did coincide with changing my SabNZB Server from Localhost to 127.0.0.1 but having reverted the changes I am still getting the error message

gboudreau commented 11 years ago

I didn't pay for nzbsrus, so I can't test on it anymore.

This error seems to indicate that the response returned from a call to this URL doesn't contain the key we need for SAB to be able to downloads NZBs without logging in: https://www.nzbsrus.com/api.php?uid=user_id&key=api_key&searchtext=nzb_filename This should return the key, but the error you get indicates it returned ? instead.

You can paste the content of the Chrome Javascript console, which contains debugging information, and I should be able to point out the exact problem, but it's not a SABconnect++ problem, it's a nzbsrus problem.

Overdose87 commented 11 years ago

this is what appears in the console. is that what you want so u can help me? getHashFromNZBsRus nzbsrus.js:64 ...using #sabcpp nzbsrus.js:67 fetch api key nzbsrus.js:89 nzbId:559764 nzbsrus.js:112 userid:(i removed it) nzbsrus.js:113 rssHash:999904579485115ab14a144d4666f1d3 nzbsrus.js:114 downloasHash:599954579485715a614a444d4666f1d3 nzbsrus.js:115 APIKey:(i removed it)

gboudreau commented 11 years ago

That part is fine. It's the part after that that fails, where it handles the response from https://www.nzbsrus.com/api.php. That part should output two -------- lines, with the response it received between them. That response is what is not right.

Overdose87 commented 11 years ago

https://www.nzbsrus.com/api.php.that page does not exist anymore. https://www.nzbsrus.com/rss.php that page shows the api

and this is all that appears on the console when i push the sab button on a file getHashFromNZBsRus nzbsrus.js:64 ...using #sabcpp nzbsrus.js:67 fetch api key nzbsrus.js:89 nzbId:559764 nzbsrus.js:112 userid:123456 nzbsrus.js:113 rssHash:999904579485115ab14a144d4666f1d3 nzbsrus.js:114 downloasHash:599954579485715a614a444d4666f1d3 nzbsrus.js:115 APIKey:123456 nzbsrus.js:116 ---------- nzbsrus.js:120 Object nzbsrus.js:121 ---------- nzbsrus.js:129

gboudreau commented 11 years ago

Why do you say api.php does not exist? It's there, and returns something (the Object in your paste). I tried it with my user ID and my API key, and it returns some results.

The error you get is that api.php did not return the NZB you clicked on. We use api.php to search for the NZB by name, then in the results it returns, we expect to get back the NZB you clicked on, but for you, it's not returned. My guess is that this NZB is not available through the RSS system.

You'll need to contact NZBsrus admins to see why this is happening. They'll probably need the nzbId that you're trying to download.

Nobgul commented 11 years ago

Gboudreau, if you give me your username on nzbsrus I will make you a VIP so you can continue to work on this project with nzbsrus. I can confirm that my sabconnect worked about 25 times today. I did have a few errors returned with certain nzb's and we are looking into this. A call to the api returns DENIED_MISSING_CREDENTIALS with no params passed. I can confirm that this does work when the right info is passed to the api. https://www.nzbsrus.com/api.php

gboudreau commented 11 years ago

Done. See email.

gboudreau commented 11 years ago

@Overdose87 Do you still have issues? We can both download the NZB you specified without problems: https://www.nzbsrus.com/nzbdetails.php?id=559764

Overdose87 commented 11 years ago

yes i still have the same problem :S

Overdose87 commented 11 years ago

DENIED_MISSING_CREDENTIALS

gboudreau commented 11 years ago

How do you see "DENIED_MISSING_CREDENTIALS"? Please send a screenshot.

Overdose87 commented 11 years ago

2

gboudreau commented 11 years ago

That is expected. That URL shouldn't load by itself in your browser. It's meant to be used by scripts like SABconnect++, by providing parameters: https://www.nzbsrus.com/api.php?uid=user_id&key=api_key&searchtext=nzb_filename Replace user_id and api_key by the appropriate values, and nzb_filename by something like Game.Of.Thrones, then it should load correctly, and output something.

Note: https://www.nzbsrus.com/ just doesn't load for me right now, so wait until it loads correctly to try again. Your test should be downloading any popular NZB from the site, by clicking the SAB button that appears.