Nyuu icon indicating copy to clipboard operation
Nyuu copied to clipboard

Upload NZB file

Open Ronnnny opened this issue 8 years ago • 7 comments

I see in uploadmgr.js that uploading the NZB file is on your TODO list, any chance of this happening in the near future? it's nice to have a copy of the original nzb file stored with the rest of the upload. Cheers.

Ronnnny avatar Aug 24 '16 18:08 Ronnnny

It's under consideration, as it isn't the most trivial thing to implement.

Ultimately, it can be done without Nyuu explicitly supporting it - just run Nyuu a second time with the NZB output from the first run as input. Of course, there's some benefits with integrating support for it, but it's not particularly high on the priority list at the moment unfortunately.

I'll update this Issue when it gets implemented. Thanks for the suggestion!

animetosho avatar Aug 25 '16 10:08 animetosho

I thought about running the upload a second time so I'll do that for now and thanks for the great piece of software :+1:

Ronnnny avatar Aug 25 '16 19:08 Ronnnny

So, are we going to be implementing NZB upload support?

sirjaymz avatar Sep 15 '18 19:09 sirjaymz

This can be harder to automate because you have to know the number of files that will be in the upload when generating the first nyuu command, but you can do what I do and manipulate the subject line, run nyuu twice, once for the files, and a second for posting the NZB. I'm not sure why this is hard to implement in nyuu, nyuu just needs to increment the file counter by 1 and add the NZB at the end.

In this example I am uploading 11 files:

nyuu -s '[{0filenum}/12] - "{filename}" yEnc ({part}/{parts}) {filesize}' -o some.nzb files* nyuu -s '[12/12] - "{filename}" yEnc ({part}/{parts}) {filesize}' some.nzb

jrehmer avatar Aug 11 '22 12:08 jrehmer

I already do that approach mentioned by @jrehmer. From a bash script, I count the files, post them starting at 01/xx, then upload the nzb aftewards and tag it as 00/xx.

nyuu "$dirname" -r -O -o "$nzbfile" --subject "$dirname - \"{filename}\" [{0filenum}/{files}] ({part}/{parts})" --comment "$dirname" -C ~/nyuu-$provider.conf -g $groups
nyuu "$nzbfile" -O -o "$nzbfile2" --subject "$dirname - \"{filename}\" [$filenum/$files] ({part}/{parts})" --comment "$dirname" -C ~/nyuu-$provider.conf -g $groups

Where $filenum is a padded zeroes variable depending on how many files/rars are uploaded, to keep the file numbering in the posted header consistent, e.g. 0/9, 00/45, 000/125, etc...

Jolly-Pirate avatar Aug 11 '22 16:08 Jolly-Pirate

I'm not sure why this is hard to implement in nyuu, nyuu just needs to increment the file counter by 1 and add the NZB at the end.

It's somewhat more complicated than that unfortunately, for example the current architecture requires knowing all files upfront (including their size) so that the progress can be calculated, or that NZB's output are streamed. Nyuu also supports outputting multiple NZBs per run (so it's not always just one file), and I might've forgotten some other place that could cause conflicts.

But yeah, I get your point.

animetosho avatar Aug 12 '22 00:08 animetosho

Will admit, I didn't look too closely at all the NZB options, but yes, I see where the complexity comes in especially in that case.

jrehmer avatar Aug 12 '22 00:08 jrehmer