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

Empty nzo_id should report an error #1198

Open
Redundant1 opened this Issue Dec 3, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@Redundant1

Redundant1 commented Dec 3, 2018

Original discussion thread: https://forums.sabnzbd.org/viewtopic.php?f=2&t=23833&sid=15c5f37cb75190a6b838cdbc1cca4c4d

SAB only gives nzo_id if it was successfully added, while success:true is just to report that the adding was successful.

The issue with this is clients interpret the success:true as the grab being successful. In actuality, the grab failed, so SAB should report success:false or otherwise report some sort of error to the client. This will inform the clients that the grab failed and they should search for another release.

@Redundant1 Redundant1 changed the title from Empty nzo_id should report success:false to Empty nzo_id should report an error Dec 3, 2018

@Safihre

This comment has been minimized.

Member

Safihre commented Dec 4, 2018

Looking into this I see that there is a problem: add_nzb/add_url accept multiple files/URL's and return multiple nzo_id's in those cases. It would require a breaking API change to somehow output which input was successful and which wasn't.
In general we only return succes: false in case the input was wrong, which I will admit is confusing but the way it has been since SABnzbd has an API.

Can you provide the forum URL where this is discussed over at Sonarr? I can maybe contribute a bit directly.

@markus101

This comment has been minimized.

markus101 commented Dec 7, 2018

Hey @Safihre it's here: https://forums.sonarr.tv/t/same-releases-downloaded-again-after-being-blacklisted/20350

We shouldn't have an issue handling the current response with some changes on our side, but would there be any way to know why it failed? We can assume it's because it's a dupe, but will that always be the case?

@Safihre

This comment has been minimized.

Member

Safihre commented Dec 7, 2018

@markus101 Well, it doesn't have to be a dupe. It can also be rejected by user's pre-processing script, an empty/incomplete NZB-file or (worst case) a crash in the NZB-importing code. For some ancient-code reason there's no real feedback what happend, it just throws an exception.. Sigh.
In any case, not getting an nzo_id always indicates that the NZB was not added to the queue.

@Safihre

This comment has been minimized.

Member

Safihre commented Dec 13, 2018

@markus101 How should we proceed with this one? Can you make the changes to Sonarr to support the current SABnzbd behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment