Hi all,
First off... god.. SABNzbd.. what a GODSEND! I still remember my paring/unraring days manually.
Anyways, I am looking to see if anyone can help write a PP script for SAB (latest beta)
This is what I want to do:
0) IF file is a single file (e.g. video) then USE the post-processing script
1) Delete .nfo file
2) Move video/file from D:\Incoming to D:\Videos
3) Delete folder created by SABnzbd from D:\Incoming
Is this possible?
Special PP script for videos? (probably VERY easy!)
Re: Special PP script for videos? (probably VERY easy!)
Why not use the categories
Re: Special PP script for videos? (probably VERY easy!)
Could you clarify please? I don't understandWhy not use the categories
Re: Special PP script for videos? (probably VERY easy!)
rasc,
I looked up what you meant. That's a great idea! I'm sorry for the noobish-ness. I'm relatively new to SAB.
At any rate, I am still looking for post processing scripts that do the above, if anyone can help.
I looked up what you meant. That's a great idea! I'm sorry for the noobish-ness. I'm relatively new to SAB.
At any rate, I am still looking for post processing scripts that do the above, if anyone can help.
Re: Special PP script for videos? (probably VERY easy!)
Shameless bump. I tried to do this myself. rofl. So fail
First, I tried plug and playing some other people's codes but it didn't work.
Second, what do I NAME the file (what extension?)
Third, help!
First, I tried plug and playing some other people's codes but it didn't work.
Second, what do I NAME the file (what extension?)
Third, help!
Re: Special PP script for videos? (probably VERY easy!)
As suggested, use categories. This is very much what they do.stisev wrote: This is what I want to do:
0) IF file is a single file (e.g. video) then USE the post-processing script
1) Delete .nfo file
2) Move video/file from D:\Incoming to D:\Videos
3) Delete folder created by SABnzbd from D:\Incoming
When an nzb is loaded by sabnzbd, set it to an appropriate category. In the scenario cited, a category of "Videos" could be used, or more popularly more granular categories such as "Movies", "TV", "Anime", etc.
In the category configuration page, set the destination for files of this category to where you want, e.g. D:\Videos for the generic "Videos" category. Now your "Videos" will end up in D:Videos and Bob's your uncle.
There is an option in sabnzbd to remove unwanted files of a type. Include ".nfo" there. If you still need some post processing, to say delete the occasional stray .nfo or .1 or .2 file, you can create a shell script (DOS batch file on Windows), python code, a binary executable or pretty much anything else that can be executed on your computer and put it into your designated sabnzbd scripts folder. Then for your "Videos" category, just set the default post processing action to your "script". It will appear in the drop down list.
That's about it. Pretty straight forward, really.
Re: Special PP script for videos? (probably VERY easy!)
Hi mini,
Thanks for the response.
So far, I have found no way of preventing SAB from creating folder of the NZB file name. For example, I download onepiece.nzb. Then, I load into SAB and it places it in a folder called onepiece. I hate that! I have to manually clean up the folders afterwards. It's not a lot of work, but it's an extra step!
Questions:
1) Is there ANY way to prevent SAB from making folders of the NZB downloads?
2) I don't want to remove .NFO files from some downloads -- JUST anime. Is this possible and could you point to the solution (I am not a programmer )
Thanks for the response.
I setup categories to move Anime to my Anime folder. Thanks, but there are a few other things that (I believe) requires post-processing script.There is an option in sabnzbd to remove unwanted files of a type. Include ".nfo" there. If you still need some post processing, to say delete the occasional stray .nfo or .1 or .2 file, you can create a shell script (DOS batch file on Windows), python code, a binary executable or pretty much anything else that can be executed on your computer and put it into your designated sabnzbd scripts folder. Then for your "Videos" category, just set the default post processing action to your "script". It will appear in the drop down list.
That's about it. Pretty straight forward, really. Smiley
So far, I have found no way of preventing SAB from creating folder of the NZB file name. For example, I download onepiece.nzb. Then, I load into SAB and it places it in a folder called onepiece. I hate that! I have to manually clean up the folders afterwards. It's not a lot of work, but it's an extra step!
Questions:
1) Is there ANY way to prevent SAB from making folders of the NZB downloads?
2) I don't want to remove .NFO files from some downloads -- JUST anime. Is this possible and could you point to the solution (I am not a programmer )
Re: Special PP script for videos? (probably VERY easy!)
1) Not something I'd ever do so don't know. Suspect not.stisev wrote: 1) Is there ANY way to prevent SAB from making folders of the NZB downloads?
2) I don't want to remove .NFO files from some downloads -- JUST anime. Is this possible and could you point to the solution (I am not a programmer )
2) Here is a naive (read: raw, untested, and undoubtedly flawed) batch file that you could try as the basis for your Anime category script:
Code: Select all
@echo off
for %%i in ("%1\*.avi" "%1\*.mkv" "%1\*.wmf") do move "%%i" "%1\.."
for %%i in ("%1\*.nfo" "%1\*.1" "%1\*.2") do del "%%i"
rmdir "%1"
The script searches for some typical media files in the destination folder. You can add or subtract file types as necessary. Note the quotes around the path names to ensure that a path with spaces will work. For each file of the type specified, it will be moved to the parent of the destination folder, e.g. "D:\Anime\onepiece\onepiece.avi" will be moved to "D:\Anime\onepiece.avi".
Then, after any media files are moved, unwanted files are deleted. Again, add and subtract file types as required.
Finally, the nzb directory is removed. Note that this has an inherent safety mechanism. If there is still a file in the nzb directory, it would be something that was unexpected. The attempt to remove the directory will fail because it is not empty. You can examine the directory and determine if the leftover file is something you want or something else to add to the list of file types to be automatically moved or removed.
On the other hand, if you just want to nuke with prejudice the nzb folder, then this modification will be of interest:
Code: Select all
@echo off
for %%i in ("%1\*.avi" "%1\*.mkv" "%1\*.wmf") do move "%%i" "%1\.."
rmdir /s /q "%1"
Anyway, something to get you started. Have fun!
Re: Special PP script for videos? (probably VERY easy!)
I will try this now
Re: Special PP script for videos? (probably VERY easy!)
i saved it as TEST.bat
it did not do the intended thing. All it did was move the NFO + ANIME + folder to D:\videos.
it did not do the intended thing. All it did was move the NFO + ANIME + folder to D:\videos.