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

CategoryX.PostScript not being added #158

Closed
helderco opened this Issue Jan 20, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@helderco

helderco commented Jan 20, 2016

Maybe I missed something but I can't get queued items to set the correct post scripts. I followed nzbToMedia's instructions.

Here's some of my config:

ConfigTemplate=/usr/local/nzbget/share/nzbget/nzbget.conf
AppendCategoryDir=yes
PostScript=DeleteSamples.py, ResetDateTime.py, Logger.py
ScriptDir=/usr/local/nzbget/share/nzbget/scripts
ScriptOrder=DeleteSamples.py, ResetDateTime.py, nzbToNzbDrone.py, nzbToCouchPotato.py, Logger.py
Category1.Aliases=movies*
Category1.DestDir=
Category1.Name=movies
Category1.PostScript=DeleteSamples.py, ResetDateTime.py, nzbToCouchPotato.py, Logger.py
Category1.Unpack=yes
Category2.Aliases=TV - HD, TV - SD, TV*
Category2.DestDir=
Category2.Name=tv
Category2.PostScript=DeleteSamples.py, ResetDateTime.py, nzbToNzbDrone.py, Logger.py
Category2.Unpack=yes
GetScripts/DeleteSamples.py:maxSampleSize=200
GetScripts/DeleteSamples.py:mediaExtensions=.mkv,.avi,.divx,.xvid,.mov,.wmv,.mp4,.mpg,.mpeg,.vob,.iso
GetScripts/DeleteSamples.py:SampleIDs=sample,-s.
nzbToMedia/nzbToCouchPotato.py:cpsCategory=movies
nzbToMedia/nzbToCouchPotato.py:cpsmethod=renamer
nzbToMedia/nzbToNzbDrone.py:ndCategory=tv

I installed Nzbget through Synology (community repository), which comes with a GetScripts and nzbToMedia folders in /usr/local/nzbget/share/nzbget/scripts.

If I use the select dialog in PostScript fields, the folder gets added along with the script name (e.g. GetScripts/DeleteSamples.py), but it's my understanding that Nzbget also searches any directory in my scripts dir (non recursively), so I must not add the path.

I also understand that config changes don't apply to queued items, but after saving and reloading and adding a new item through Sonarr or CouchPotato, the queued item doesn't have the scripts I've chosen in Postprocess as if the category didn't match, even though the queue shows the correct category (i.e. movies or tv respectively).

By the way, it actually matches the Logger.py script, just not the others in GetScripts or nzbToMedia. Should I add the folder to CategoryX.PostScript fields after all?

What am I missing?

@helderco

This comment has been minimized.

Show comment
Hide comment
@helderco

helderco Jan 20, 2016

Well.... I just tested without removing the path names, using the "Choose" dialog and it works now.

But, shouldn't we change this in nzbget.conf?

The scripts in the list must be separated with commas or semicolons. Only filenames without path must be used. All scripts must be stored in directory pointed by option <ScriptDir>.

Example: Cleanup.sh, Move.sh, EMail.py.

To this assumption I also read in Script consisting of multiple files:

If your script consists or multiple files, put the script and all related files into a subdirectory within ppscripts-directory. NZBGet scans the first-level subdirectory of ppscripts-directory and will find your main script file (the file containing script definition signature). All other files will be ignored. You can also created subdirectories in your script-directory. These subdirectories will not be scanned.

helderco commented Jan 20, 2016

Well.... I just tested without removing the path names, using the "Choose" dialog and it works now.

But, shouldn't we change this in nzbget.conf?

The scripts in the list must be separated with commas or semicolons. Only filenames without path must be used. All scripts must be stored in directory pointed by option <ScriptDir>.

Example: Cleanup.sh, Move.sh, EMail.py.

To this assumption I also read in Script consisting of multiple files:

If your script consists or multiple files, put the script and all related files into a subdirectory within ppscripts-directory. NZBGet scans the first-level subdirectory of ppscripts-directory and will find your main script file (the file containing script definition signature). All other files will be ignored. You can also created subdirectories in your script-directory. These subdirectories will not be scanned.

@helderco helderco closed this Jan 20, 2016

@hugbug

This comment has been minimized.

Show comment
Hide comment
@hugbug

hugbug Jan 20, 2016

Member

The scripts in the list must be separated with commas or semicolons. Only filenames without path must be used. All scripts must be stored in directory pointed by option .

You are right, this is misleading. Paths relative to ScriptDir were mean. I'll rephrase it. Thanks.

Member

hugbug commented Jan 20, 2016

The scripts in the list must be separated with commas or semicolons. Only filenames without path must be used. All scripts must be stored in directory pointed by option .

You are right, this is misleading. Paths relative to ScriptDir were mean. I'll rephrase it. Thanks.

@hugbug hugbug reopened this Jan 20, 2016

@hugbug hugbug added the improvement label Jan 21, 2016

@hugbug hugbug added this to the v17.0 milestone Jan 21, 2016

@hugbug hugbug closed this in 194a4a6 Feb 27, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment