Is there a way to add a new nzb to the start of the queue instead of the end?

Asked by Craig Duncan

I have an automatic download solution, that drops nzb's in my monitored folder, to then be picked up automatically by lottznzb. However these are usually added to the bottom of the queue, and require some user intervention to the get them to the top.

Certain downloads take precendence over others, and so I wish to add them to the top of the queue instead of the bottom.

If there is currently no way to do this, then could there be a command line switch added for use when opening an nzb with lottanzb?

Other than there could be a command line argument to move a specified nzb (by filename?) to the top of the list.


Question information

English Edit question
LottaNZB Edit question
No assignee Edit question
Solved by:
Severin Heiniger
Last query:
Last reply:
Revision history for this message
Best Severin Heiniger (severinh) said :

Hi Craig,

thanks for making this suggestion. LottaNZB uses HellaNZB's "force" method to move downloads to the top, but this method only accepts numerical download IDs as listed using the "list" command. But I think it's not really faster to find out the ID first and then run "hellanzb -c ~/.lottanzb/hellanzb.conf force THE_ID" than bringing up the LottaNZB main window. ;-)

I think there are two possible ways of improving the current situation.

1. Like you suggested: Provide the "lottanzb" command with a "--force" argument so that one can enqueue NZB files like this: "lottanzb your_nzb_file.nzb --force". However, simply putting NZB files in the monitored HellaNZB directory (and that is what you do right now if I understand you correctly) wouldn't change anything. One would need to come up with a different solution. It would basically be possible to modify the desktop file in /usr/share/applications and add the --force argument to the default parameters.

2. The next version of LottaNZB will feature a new plugin mechanism. One could create a simple plugin for LottaNZB that automatically moves all newly added downloads to the top of the queue. However, this would be an "all-or-nothing" solution.

There might be better solutions. Look forward to hearing from you.


Revision history for this message
Craig Duncan (duncan3dc) said :

Hi Severin,

Thanks for the quick response.

The things you pointed out in your first paragraph have helped me greatly. After adding my nzb's to the queue I will be able to run a list command followed by force command.

In response to your two solutions

1. Sorry I didn't make it clear but yes I intended to change my script to explicitly enqueue the nzb instead of dropping it into the monitored directory. So the --force argument would still be a very welcome addition.

2. I look forward to experimenting with this new plugin system. Prior to contacting you I had browsed the source code to see if I could find anything that would help me, but my experience with python is still in it's infancy. I would love to contribute to your project, so hopefully this plugin mechanism will allow me to gain some familiarity with the program before digging deeper.

How active is development on lottanzb?


Revision history for this message
Craig Duncan (duncan3dc) said :

Thanks Severin Heiniger, that solved my question.

Revision history for this message
Severin Heiniger (severinh) said :

The --force argument will probably not be that easy to implement since after the execution of "enqueue", one needs to wait until the download has actually been added to the queue by HellaNZB before one can call the "force" method. And right now, we don't have a convient mechanism for detecting such an event. But it's worth trying.

LottaNZB's plugin system works great so far, but it's still in an early state. Since every plugin can/needs to mess with the application's internals, the way how things work is likely to change over time so it's not really suitable for the developer crowd out there right now. ;-) Of course we highly appreciate contributions in any form, no matter if it's code, blueprints, bug reports etc.

I can assure you that the project is far from dead. :-D Sander and I have both much non-LottaNZB stuff to do, but I really like to spend some hours working on LottaNZB now and then.

Revision history for this message
Craig Duncan (duncan3dc) said :

I realised that when I implemented it after your last message. But a sleep command (while obviously not the most elegant solution) will satisfy most cases for now.

Well keep up the good work guy's, I find lottanzb a really good program.
I think it's being added to the ubuntu repositories for 9.04.