Can I execute custom post script?

Feel free to talk about anything and everything in this board.
Post Reply
hortoristic
Newbie
Newbie
Posts: 14
Joined: June 14th, 2011, 11:47 pm

Can I execute custom post script?

Post by hortoristic »

My players don't know how to play MKV files, but by simply renaming the .MKV to .AVI they play fine.  Is there some way I can get SAB or Sickbeard to auto rename from MKV to AVI extension?  A simple DOS command script won't work as it needs to traverse all the TV subfolders - so was hoping SAB or SB could do it.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Can I execute custom post script?

Post by shypike »

Sorry, the only way is create a user script.
Eejit
Sr. Member
Sr. Member
Posts: 267
Joined: September 10th, 2008, 5:46 pm

Re: Can I execute custom post script?

Post by Eejit »

I wrote this as my media player doesn't like IMG unless the're renamed to ISO. It will search through all sub directories of the (in my case) the movie just downloaded.

Code: Select all

cd %1

for /r %%x in (*.IMG) do ren "%%x" *.ISO
Eejit - The name say's it all !!
Image
hortoristic
Newbie
Newbie
Posts: 14
Joined: June 14th, 2011, 11:47 pm

Re: Can I execute custom post script?

Post by hortoristic »

Very nice - how do I get your script to auto execute - or do I just schedule a windows task or something?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Can I execute custom post script?

Post by shypike »

hortoristic
Newbie
Newbie
Posts: 14
Joined: June 14th, 2011, 11:47 pm

Re: Can I execute custom post script?

Post by hortoristic »

So I set up a folder URL for as:
Post-Processing Scripts Folder: C:\Users\User\Videos\SAB Scripts

Within the folder I created a text file called: "Rename MKV to AVI.txt"

Within this text file I put:
cd %1
for /r %%x in (*.MKV) do ren "%%x" *.AVI

As I need to rename all my .MKV to .AVI

I then d/l a TV show that is .MKV, but SAB never seemed to execute the script - it extracted still as an .MKV and never renamed. Within the log file is no mention of my script having been ran - one thing I haven't restarted SAB since putting in the script folder location - so maybe that will help - will try now.

Is the above the correct process for adding a custom script?
User avatar
jcfp
Release Testers
Release Testers
Posts: 1004
Joined: February 7th, 2008, 12:45 pm

Re: Can I execute custom post script?

Post by jcfp »

Although I never use windoze for this kind of thing, I doubt it will be able to execute files with a .txt extension (cmd? bat?). And you'll still need to tell sab to execute it as a postproc script (probably via category setup); just putting the file in the script directory only makes it selectable in sab's web interface.
hortoristic
Newbie
Newbie
Posts: 14
Joined: June 14th, 2011, 11:47 pm

Re: Can I execute custom post script?

Post by hortoristic »

That was it - nowhere did I find that I was supposed to make changes in categories section.
Post Reply