Hi All,
I have SABnzbd running on a Synology Diskstation and am looking for a little help with a post processing script. On a diskstation there is a binary file (synoindex) that can be used to update the uPnP database, if I copied the files to the NAS normally this process would run and update the uPnP database. However because the SABnzbd process moves them directly to the disk the process doesn't run.
The usage for synoindex is described below:
Add: synoindex -a filename
Delete: synoindex -d filename
Add folder: synoindex -A folder
Delete folder: synoindex -D folder
Rename/move file/folder: synoindex -N newfullpath oldfullpath
Update Photo Images: synoindex -U photo
Get from DB: synoindex -g filename -t [video|music|photo|playlist]
So I guess what I'm after is something to run /user/syno/bin/synoindex -a
I have plenty of experience with vbscript in windows but have no idea where to start with a post processing script running on linux
Post process scripting on Synology
Forum rules
Help us help you:
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.
Re: Post process scripting on Synology
Hey all,
think I've got a bit further with this. If I create a script with the below
/user/syno/bin/synoindex -A $1
This should add the directory to the uPnP database
Does anyone have any idea if this would actually work?
think I've got a bit further with this. If I create a script with the below
/user/syno/bin/synoindex -A $1
This should add the directory to the uPnP database
Does anyone have any idea if this would actually work?
Re: Post process scripting on Synology
Thanks PoD,
I did run it on its own, just to check it worked. Unfortunatly I left the "%1" in rather than replacing it with a folder name. My DiskStation is now trying to index everything it can see (including all the sys and usr stuff)!! Its been running for about 12 hours and hasn't finished yet, have a call logged with Synology. Just a word of warning to anyone else who is looking for this.
I notice your script doesn't include double quotes around the variable, if I remove mine what will happen if the folder path includes spaces? Also what does the bin/bash bit at the top do? I know its a probably got a really simple answer but I'm just trying to avoid breaking the NAS box (again!)
I did run it on its own, just to check it worked. Unfortunatly I left the "%1" in rather than replacing it with a folder name. My DiskStation is now trying to index everything it can see (including all the sys and usr stuff)!! Its been running for about 12 hours and hasn't finished yet, have a call logged with Synology. Just a word of warning to anyone else who is looking for this.
I notice your script doesn't include double quotes around the variable, if I remove mine what will happen if the folder path includes spaces? Also what does the bin/bash bit at the top do? I know its a probably got a really simple answer but I'm just trying to avoid breaking the NAS box (again!)
Re: Post process scripting on Synology
On Windows, the parameters are passed with the quotes (so you don't need to add them in your script).
On Linux and OSX, the parameters do not have quotes, so your script needs to add them.
This difference is caused by the Python run-time library, we cannot fix this issue.
(Python is the programming language we use).
On Linux and OSX, the parameters do not have quotes, so your script needs to add them.
This difference is caused by the Python run-time library, we cannot fix this issue.
(Python is the programming language we use).
Re: Post process scripting on Synology
Thanks shypike,
If my NAS ever manages to finish indexing itself I'll use the below.
-----------------------------------------
#!/bin/bash
/user/syno/bin/synoindex -A "$1"
-----------------------------------------
thanks everyone.
If my NAS ever manages to finish indexing itself I'll use the below.
-----------------------------------------
#!/bin/bash
/user/syno/bin/synoindex -A "$1"
-----------------------------------------
thanks everyone.
Re: Post process scripting on Synology
Hello,
i've the same problem. Does your last script is working ? Can you tel me the exact procedure to set it on my NAS ? (where i should copy it, how etc...) Thank you !!
i've the same problem. Does your last script is working ? Can you tel me the exact procedure to set it on my NAS ? (where i should copy it, how etc...) Thank you !!
Re: Post process scripting on Synology
Hello. I really need this cool script. Can anyone help me to make it work with the last version of sabnzbd ?
What is the syntax ? How should I rename the script file ? Thanks a lot in advance.
What is the syntax ? How should I rename the script file ? Thanks a lot in advance.