Skip to content
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

Upload NZB file #5

Open
Ronnnny opened this issue Aug 24, 2016 · 7 comments
Open

Upload NZB file #5

Ronnnny opened this issue Aug 24, 2016 · 7 comments

Comments

@Ronnnny
Copy link

Ronnnny commented Aug 24, 2016

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.

@animetosho
Copy link
Owner

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!

@Ronnnny
Copy link
Author

Ronnnny commented Aug 25, 2016

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

@sirjaymz
Copy link

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

@jrehmer
Copy link

jrehmer commented Aug 11, 2022

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

@Jolly-Pirate
Copy link

Jolly-Pirate commented Aug 11, 2022

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...

@animetosho
Copy link
Owner

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.

@jrehmer
Copy link

jrehmer commented Aug 12, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants