Hello together,
i am fetching many NZB in community's that aren't aware that Plex is unable to get Meta Data when the root folder of a movie contains underscores or blanks.
For reasons that are beyond my knowledge, they remove the dots in topic titles and the folder names of scene releases
SABNZB supports replacing blanks with underscores, but there is no option available in settings that replaces blanks with dots.
Hence I need a script that replaces these chars with dots.
The script needs to be POSIX complaint because SABNZBD runs on my Synology DS216j and unfortunately DSM 6.x supports only the ash shell.
Any help is highly appreciated.
Thank you very much in advance.
Script Request - Replace Chars in Folder Names
Re: Script Request - Replace Chars in Folder Names
Just use a Python script as Pre-Queue script:
Code: Select all
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 the output of this script
# Replace whatever you want:
nzbname = nzbname.replace(' ', '.')
print "1" # Accept
print nzbname
print
print
print
print
print
# 0 means OK
sys.exit(0)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate