Search found 17 matches

by gohakn
January 13th, 2024, 1:03 pm
Forum: General Help
Topic: Sort queue according to file size when nzb is added (3rd)
Replies: 2
Views: 2210

Re: Sort queue according to file size when nzb is added (3rd)

After searching inside /usr/bin/ at my NAS I found the following "Link?" from python3 -> python3.8. https://snipboard.io/1OZKPc.jpg So I changed the first line in the script to #!/usr/bin/python3.8 and now it's working again. ;D Is this a type of "Link" and why did it work under ...
by gohakn
January 13th, 2024, 10:56 am
Forum: General Help
Topic: Sort queue according to file size when nzb is added (3rd)
Replies: 2
Views: 2210

Sort queue according to file size when nzb is added (3rd)

Again after updating sabnzbd to 4.2.1 on my Synology DS1817+ my prequeue Script priorising files < 50 MB stopped working. Following safihres hint to the changelog and the wiki i tried the code from the 'example2' but added files smaller 50MB won't get priorised. import sys try: # Parse the input var...
by gohakn
May 24th, 2023, 2:38 pm
Forum: General Help
Topic: Sort queue according to file size when nzb is added (The 2nd)
Replies: 25
Views: 5461

Re: Sort queue according to file size when nzb is added (The 2nd)

Pre-queue scripts receive additional arguments since v4.0.0, so your script needs to handle that. See the second example script at https://sabnzbd.org/wiki/scripts/pre-queue-scripts You were pointing me into the right direction. Just had to ad the leading line #!/usr/bin/python3 , and same like Aug...
by gohakn
May 23rd, 2023, 3:38 pm
Forum: General Help
Topic: Sort queue according to file size when nzb is added (The 2nd)
Replies: 25
Views: 5461

Re: Sort queue according to file size when nzb is added (The 2nd)

Here`s the unchanged script #!/usr/bin/python3 import sys try: (scriptname, nzbname, postprocflags, category, script, prio, downloadsize, grouplist, showname, season, episodenumber, episodename) = sys.argv downloadsize = int(downloadsize) except: sys.exit(1) # exit with 1 causes SABnzbd to ignore th...
by gohakn
May 23rd, 2023, 3:34 pm
Forum: General Help
Topic: Sort queue according to file size when nzb is added (The 2nd)
Replies: 25
Views: 5461

Re: Sort queue according to file size when nzb is added (The 2nd)

Yes the script wasn`t changed since August 2022. The directories are the same and the file is executable... Just made a restart of the Synology, but the Problem still resists. Same with some new testfiles... 2023-05-23 22:22:28,817::INFO::[misc:1169] [sabnzbd.newsunpack.pre_queue] Running external c...
by gohakn
May 23rd, 2023, 5:18 am
Forum: General Help
Topic: Sort queue according to file size when nzb is added (The 2nd)
Replies: 25
Views: 5461

Re: Sort queue according to file size when nzb is added (The 2nd)

is that enough? i was just looking for the word 'fileprio' 2023-05-22 22:41:09,275::DEBUG::[misc:1170] Popen arguments: {'stdin': -1, 'stdout': -1, 'stderr': -2, 'startupinfo': None, 'creationflags': 0, 'env': {'SYNOPKG_PKGVAR': '/volume1/@appdata/sabnzbd', 'SYNOPKG_PKGPORT': '8080', 'SYNOPKG_USERNA...
by gohakn
May 22nd, 2023, 3:46 pm
Forum: General Help
Topic: Sort queue according to file size when nzb is added (The 2nd)
Replies: 25
Views: 5461

Re: Sort queue according to file size when nzb is added (The 2nd)

2023-05-22 22:41:09,275::INFO::[misc:1169] [sabnzbd.newsunpack.pre_queue] Running external command: ['/volume1/@appstore/sabnzbd/bin/nice', '-n15', '/volume1/@appstore/sabnzbd/bin/ionice', '-c2', '-n4', '/volume1/@appdata/sabnzbd/@script_dir@/fileprio', '22-05-2023 Bildzeitung / IDmZNQeou6TiEz1DEA4...
by gohakn
May 22nd, 2023, 3:23 pm
Forum: General Help
Topic: Sort queue according to file size when nzb is added (The 2nd)
Replies: 25
Views: 5461

Re: Sort queue according to file size when nzb is added (The 2nd)

Dear Safihre, do you know if there were changes in SABNZBD 4.0.1 or can it be a result of installing python 3.11 but somehow the script you showed me in 2022 doesn`t work anymore. Unfortunately I can`t say if this happend after installing SABNZBD or python 3.11. https://snipboard.io/SwGJRs.jpg Thank...
by gohakn
August 5th, 2022, 1:33 pm
Forum: General Help
Topic: Sort queue according to file size when nzb is added (The 2nd)
Replies: 25
Views: 5461

Re: Sort queue according to file size when nzb is added (The 2nd)

Donation is on it`s way...
Have a nice WE.
by gohakn
August 5th, 2022, 1:29 pm
Forum: General Help
Topic: Sort queue according to file size when nzb is added (The 2nd)
Replies: 25
Views: 5461

Re: Sort queue according to file size when nzb is added (The 2nd)

WOOhoooooo, now it`s working!! I did some changes in the Example Code from the WIKI after I read about problems with TABS and SPACES in python3.x codes... https://stackoverflow.com/questions/4446366/why-am-i-getting-indentationerror-expected-an-indented-block I followed (Tip Nr.3) ereasing all tabs ...
by gohakn
August 5th, 2022, 12:58 pm
Forum: General Help
Topic: Sort queue according to file size when nzb is added (The 2nd)
Replies: 25
Views: 5461

Re: Sort queue according to file size when nzb is added (The 2nd)

After I`ve googled "shebang" :) and landing at WIKIPEDIA I also tried "#!/usr/bin/env python3" but no change..
by gohakn
August 5th, 2022, 12:50 pm
Forum: General Help
Topic: Sort queue according to file size when nzb is added (The 2nd)
Replies: 25
Views: 5461

Re: Sort queue according to file size when nzb is added (The 2nd)

I think you're running a python script as a shell script. Solution: put a "shebang" in the first line, "#!/usr/bin/python3" I did, but nothing changed... 2022-08-05 19:45:48,125::DEBUG::[filesystem:1110] [sabnzbd.nzbstuff.__init__] Saving data for SABnzbd_nzf_2x71_0ph in /volume...
by gohakn
August 5th, 2022, 11:55 am
Forum: General Help
Topic: Sort queue according to file size when nzb is added (The 2nd)
Replies: 25
Views: 5461

Re: Sort queue according to file size when nzb is added (The 2nd)

I Think it happens at 2022-08-05 18:45:16,133 2022-08-05 18:45:14,578::DEBUG::[interface:133] Request GET /api from 192.168.123.41 [Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0] {'mode': 'queue', 'search': '', 'start': '0', 'limit': '250', 'output': 'json', 'apike...
by gohakn
August 4th, 2022, 2:08 pm
Forum: General Help
Topic: Sort queue according to file size when nzb is added (The 2nd)
Replies: 25
Views: 5461

Re: Sort queue according to file size when nzb is added (The 2nd)

It was your link to the wiki in Post #109511 to the wiki **##sabnzbd*org/wiki/scripts/pre-queue-scripts Example Script 2 A python script to set prio to Force on downloads smaller than 50MB: import sys try: (scriptname, nzbname, postprocflags, category, script, prio, downloadsize, grouplist, showname...