[Queue-Script] QueueSort - automatic queue sorting

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
Post Reply
hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

[Queue-Script] QueueSort - automatic queue sorting

Post by hugbug » 11 Feb 2015, 19:50

Once a new nzb-file is added to queue this script resorts all nzb-files in the download queue according to the sort order defined in the script settings.

Please take into account that if you reorder files manually, the order will be changed again when a new nzb-file is added to queue, overriding your changes.

This script requires NZBGet 15.0-testing-r1205 or newer.

Script-version: 1.0
Attachments
QueueSort.py
QueueSort-1.0
(4.27 KiB) Downloaded 1309 times

get39678
Posts: 222
Joined: 09 Jun 2014, 10:49

Re: [Queue-Script] QueueSort - automatic queue sorting

Post by get39678 » 19 Feb 2015, 17:22

If you test this script with adding 200 items to the queue (clearly shows the problem) it takes it quite some time to sort out the duplicates probably due to it continually sorting.

Is there anything that could be done to limit the number of times it sorts?

Thanks

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [Queue-Script] QueueSort - automatic queue sorting

Post by hugbug » 19 Feb 2015, 18:55

I've tested with 200 nzbs and it worked without issues. The test was run a fast desktop PC. I wouldn't do that on my small linux box, where python-scripts require several seconds just to boot.

What do you mean with "clearly shows the problem", what problem does it show?
To info:
  • duplicates go straight to history without calling of queue-scripts;
  • queue-scripts are executed asynchronously after the nzbs are added to queue;
  • you can continue using the program when queue-scripts work.
What hardware you did this test on? Is the problem with slow starting of python? Check the time interval between messages "Executing queue-script QueueSort.py" and "QueueSort: Sorting queue".

TheStapler
Posts: 11
Joined: 10 Jan 2016, 23:18

Re: [Queue-Script] QueueSort - automatic queue sorting

Post by TheStapler » 25 Jan 2016, 01:51

I can't seem to get this working... I am not sure maybe I have the wrong version of python, but I am using the PHAZE UNRAID installer...

silentremux
Posts: 1
Joined: 30 Dec 2018, 10:23

Re: [Queue-Script] QueueSort - automatic queue sorting

Post by silentremux » 10 Jun 2020, 07:40

@hugbug

Is there a python3 compatible version of this somewhere floating about?

I get this when using py3

Code: Select all

    Wed Jun 10 2020 08:15:19    QueueSort: ModuleNotFoundError: No module named 'xmlrpclib'
INFO    Wed Jun 10 2020 08:15:19    QueueSort: from xmlrpclib import ServerProxy
INFO    Wed Jun 10 2020 08:15:19    QueueSort: File "/scripts/nzbget/QueueSort.py", line 55, in <module>
INFO    Wed Jun 10 2020 08:15:19    QueueSort: Traceback (most recent call last):

Hidendra
Posts: 4
Joined: 13 Apr 2021, 19:01

Re: [Queue-Script] QueueSort - automatic queue sorting

Post by Hidendra » 13 Apr 2021, 19:03

silentremux wrote:
10 Jun 2020, 07:40
@hugbug

Is there a python3 compatible version of this somewhere floating about?

I get this when using py3

Code: Select all

    Wed Jun 10 2020 08:15:19    QueueSort: ModuleNotFoundError: No module named 'xmlrpclib'
INFO    Wed Jun 10 2020 08:15:19    QueueSort: from xmlrpclib import ServerProxy
INFO    Wed Jun 10 2020 08:15:19    QueueSort: File "/scripts/nzbget/QueueSort.py", line 55, in <module>
INFO    Wed Jun 10 2020 08:15:19    QueueSort: Traceback (most recent call last):
Change

Code: Select all

from xmlrpclib import ServerProxy
to:

Code: Select all

from xmlrpc.client import ServerProxy
No problems then on python3.

spencerjford
Posts: 1
Joined: 30 Sep 2021, 14:54

Re: [Queue-Script] QueueSort - automatic queue sorting

Post by spencerjford » 30 Sep 2021, 14:56

That didn't work, now i seeing

C:\Python27\python.exe: can't open file 'C:\ProgramData\NZBGet\scripts\L': [Errno 2] No such file or directory

bakker_be
Posts: 3
Joined: 20 Apr 2020, 07:40

Re: [Queue-Script] QueueSort - automatic queue sorting

Post by bakker_be » 24 Dec 2021, 11:09

spencerjford wrote:
30 Sep 2021, 14:56
That didn't work, now i seeing

C:\Python27\python.exe: can't open file 'C:\ProgramData\NZBGet\scripts\L': [Errno 2] No such file or directory
That's still python 2.7, not 3.x ...

bakker_be
Posts: 3
Joined: 20 Apr 2020, 07:40

Re: [Queue-Script] QueueSort - automatic queue sorting

Post by bakker_be » 24 Dec 2021, 11:10

Python 3.x version
QueueSort.py
(4.28 KiB) Downloaded 1340 times

Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests