I searched for a long time for this answer, I know it's easy but I'm kinda half dumb. I've got my post processing scripts running fine, and no problems there. My issue is that sometimes I need the .nfo's, and sometimes I don't. Since I sickbeard and wind up with a LOT of files, those stray nfo's just clutter everything up.
How could I add a line to the TV and Movies categories scripts to delete readme/nfo/sfv?
Selective delete based on category
-
- Newbie
- Posts: 4
- Joined: December 7th, 2011, 3:08 pm
Re: Selective delete based on category
Create a post-processing script for these categories.
Assuming Windows:For more info about scripts: http://wiki.sabnzbd.org/user-scripts
Assuming Windows:
Code: Select all
@echo off
cd %1
del /s/q *.nfo
-
- Newbie
- Posts: 4
- Joined: December 7th, 2011, 3:08 pm
Re: Selective delete based on category
Thanks, will read. Whatever I read before wasn't especially helpful. Not windows, debian-based linux mint.
Hm, ok, would something like this work? Just appended to the bottom of the existing userscript?
What is syntax for additional files, just newline rm *.sfv etc?
Oh..wait
Appended as necessary. That's prettier.
And edited for the gazillionth time...I'm dumb, the sickbeard post processing scripts are python not bash, no idea what I'm doing.
Hm, ok, would something like this work? Just appended to the bottom of the existing userscript?
Code: Select all
@echo off
cd $1
rm *.nfo
Oh..wait
Code: Select all
rm -f $1/*.nfo
rm -f $1/*.srr
rm -f $1/*.sfv
rm -f $1/*.nzb
And edited for the gazillionth time...I'm dumb, the sickbeard post processing scripts are python not bash, no idea what I'm doing.
Re: Selective delete based on category
For Linux:
Don't forget to set the X bit of the file:
Code: Select all
#!/bin/sh
cd "$1"
rm -r *.nfo
Code: Select all
chmod +x scriptname
-
- Newbie
- Posts: 4
- Joined: December 7th, 2011, 3:08 pm
Re: Selective delete based on category
Please forgive the quantity of my noobness here, and I've totally got this for most categories. However, what about my TV category where it's already using the sabtosickbeard.py script? How can I append this to that script?
Re: Selective delete based on category
Call the SB script from your's.
Or whatever the SB script is called.
Code: Select all
#!/bin/sh
cd "$1"
rm -r *.nfo
sabtosickbeard.sh "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
-
- Newbie
- Posts: 4
- Joined: December 7th, 2011, 3:08 pm
Re: Selective delete based on category
OH MY GOSH DUH. Thanks.