Pre_queque script

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
Richard63NL
Newbie
Newbie
Posts: 22
Joined: August 22nd, 2019, 10:32 am

Pre_queque script

Post by Richard63NL »

Hello, ive made a pre queue script that takes the nzbname and filter not needed text out of the name.
and if there is a year mentiont there it is placed in "( and )".
and i derive a adult category from the name (xxx in text)

Now do i come across a lot of names with a date in it (japanese format) YY.MM.DD like 25.02.05 as in 5 februari 2025.

I was trying to filter this and place the year after the film name

example: Night.Rider.25.02.05.WRB.DIVX.ETC

becomes: Night Rider (2025)
i tested this online in a python interpreter but in sabnzbd it dousnt work

Only the part without the year filtering

Anyone care to help me ?
User avatar
sander
Release Testers
Release Testers
Posts: 9204
Joined: January 22nd, 2008, 2:22 pm

Re: Pre_queque script

Post by sander »

Post the code?
Richard63NL
Newbie
Newbie
Posts: 22
Joined: August 22nd, 2019, 10:32 am

Re: Pre_queque script

Post by Richard63NL »

i f*cked op the code, Hope tomorow back with working version so far.
Richard63NL
Newbie
Newbie
Posts: 22
Joined: August 22nd, 2019, 10:32 am

Re: Pre_queque script

Post by Richard63NL »

why cant i post the code ?
User avatar
sander
Release Testers
Release Testers
Posts: 9204
Joined: January 22nd, 2008, 2:22 pm

Re: Pre_queque script

Post by sander »

Richard63NL
Newbie
Newbie
Posts: 22
Joined: August 22nd, 2019, 10:32 am

Re: Pre_queque script

Post by Richard63NL »

ok here is the script.
https://pastebin.com/G9MukixA

this is a working script

input" moviename 2025 blablabla
outputs: moviename (2035)
User avatar
sander
Release Testers
Release Testers
Posts: 9204
Joined: January 22nd, 2008, 2:22 pm

Re: Pre_queque script

Post by sander »

Please describe what is working on your local system: both from the CLI and from SABnzbd

Because, for example ... do you have python3 installed on your system?

Is the script called, and working (sometimes)?

There is no she-bang. Is it executable?

Where are the test cases?
User avatar
sander
Release Testers
Release Testers
Posts: 9204
Joined: January 22nd, 2008, 2:22 pm

Re: Pre_queque script

Post by sander »

Richard63NL wrote: February 5th, 2025, 2:50 pm

example: Night.Rider.25.02.05.WRB.DIVX.ETC

becomes: Night Rider (2025)

Not with the script you provided:

Code: Select all

$ ./prequeue-richard63nl.py "Night.Rider.25.02.05.WRB.DIVX.ETC"  postprocflags in_category script prio downloadsize grouplist 
1
Night Rider 25 02 05 WRB DIVX.ETC

movies



$
Richard63NL
Newbie
Newbie
Posts: 22
Joined: August 22nd, 2019, 10:32 am

Re: Pre_queque script

Post by Richard63NL »

indeed not with this script
it does with: moviename 2025 blabla bla bl
and moviename bla bla xxx bla bla bla (it cuts everything after and with xxx)
Richard63NL
Newbie
Newbie
Posts: 22
Joined: August 22nd, 2019, 10:32 am

Re: Pre_queque script

Post by Richard63NL »

with this script it handles things i need, but would be nice to get some help with the extra part
of renaming Filmname.25.02.02.somthing.else Into Filmname (2025) also

what i got so far (and working) is here: https://pastebin.com/G9MukixA
Post Reply