animetosho / Nyuu

Flexible usenet binary posting tool
215 stars 30 forks source link

Dont write NZB on errors #126

Closed Fossil01 closed 7 months ago

Fossil01 commented 7 months ago

Looks like a valid NZB is being written when uploading is incomplete due to "too many connections" errors. This is using --nzb-cork option.

Any way to fail it and delete the NZB when this happens?

animetosho commented 7 months ago

If you're running this in a script, you can check the error code and if it's not 0, delete the file.

Does that help?

Fossil01 commented 7 months ago

I guess that works although IMHO it would be cleaner is Nyuu had an option to just not write the buffer/file on error.

animetosho commented 7 months ago

I think I had something half written to do this - I can look at completing it.

Fossil01 commented 7 months ago

Thanks so much

Fossil01 commented 5 months ago

What options do I set for this?

--nzb-del-incomplete  --nzb-file-mode defer

Or --nzb-file-mode stream?

animetosho commented 5 months ago

--nzb-del-incomplete is probably want you want.

--nzb-file-mode affects the way the NZB is written - you probably don't need to bother with it.

Fossil01 commented 5 months ago

Thats the only param? Because I just was messing around with some connection errors but it still wrote the NZB. But perhaps it just retried the connection and actually succeeded.

animetosho commented 5 months ago

Thats the only param?

Yes.

It only deletes the file if Nyuu exits prematurely. If Nyuu is still running, it won't delete it.
Note that skipping errors won't cause Nyuu to exit prematurely on those.

But perhaps it just retried the connection and actually succeeded.

You can check the NZB to see if all the articles are present there.