[Windows] YoVanilla: Movie and Documentary Post-Processing

Come up with a useful post-processing script? Share it here!
Post Reply
NoTolerance
Full Member
Full Member
Posts: 127
Joined: June 27th, 2012, 9:55 am

[Windows] YoVanilla: Movie and Documentary Post-Processing

Post by NoTolerance »

Note: This is my first script. Be gentle...

Disclaimer: I'm not a developer or programmer by trade. A friend was complaining about a limitation and I saw an opportunity to fill the void. It also gave me the opportunity to address a couple of issues I had with the post-processing script I had been using. What I developed seemed somewhat useful, so I thought I would share it with this community. I welcome your feedback and suggestions, but please understand that this is barely a beta release. As such, I'm looking for bug reports.

What It Does:
  1. You download a file named 'Movie Title 2012 1080p AVCHD AC3 x264 DVD5'.
  2. After the extraction Sab does automatically, you're left with a folder named 'Movie Title 2012 1080p AVCHD AC3 x264 DVD5'. Inside that folder you'll typically have a number of files - most of which you do not need or want.
  3. YoVanilla creates a folder named 'Movie Title (2012)' in a directory of your choosing. This is usually the final directory where you store your media. Example: D:\Media\Movies\Movie Title (2012)
  4. If you specify file types to keep, it will rename and move those files into the newly created folder from step 3.
  5. If you specified file types to delete, it will delete those files.
  6. If your download is a split (2-part) AVI file, it will join/combine the split files into a single AVI. (Requires mencoder.exe to be saved in the scripts folder.)
  7. The movie file will be ranamed and moved. Example: 'Movie Title 2012 1080p AVCHD AC3 x264 DVD5.mkv' will be saved as 'D:\Media\Movies\Movie Title (2012)\Movie Title (2012).mkv'
  8. The download directory is cleaned up and removed.
Installation:
Please read the included README file for detailed instructions.

Quick Summary: Extract to your scripts folder.

Configuration:
Please read the included README file for detailed instructions.

Quick Summary: Edit the included INI file and set up your categories in Sab to use the script.

Known Issues:
  • If you're using Windows 10 and trying to have your files moved to a network drive, you may find that the files don't get moved properly. Here is the current workaround for that issue:
    Locate the YoVanilla.exe file in your scripts directory, right-click on it, choose Properties, go to Compatibility tab, check the box that says "Run this program as an administrator". You could also enable the option to "Run this program in compatibility mode for: Windows 7

    You can also disable UAC in Windows 10, though this is a less secure method of running your OS.
  • I haven't found an automated way to combine split subtitle files. There are websites and software apps that can do it for you. This is really only an issue for joined AVI files.
  • Episode management hasn't been implemented yet. This is being planned for a future release.
Report additional bugs or issues to NoTolerance <at> gmail <dot> com
Please attach a logfile if possible.

Links:
Current Version of YoVanilla Available Here
mencoder.exe (required for joining split AVI files) is part of the MPlayer package. Extract mencoder.exe into your scripts folder.

*Download link updated on 4/20/2015
Last edited by NoTolerance on December 30th, 2016, 9:25 am, edited 4 times in total.
NoTolerance
Full Member
Full Member
Posts: 127
Joined: June 27th, 2012, 9:55 am

Re: [Windows] YoVanilla: Movie and Documentary Post-Processi

Post by NoTolerance »

YoVanilla Change Log
====================
1.0.0.71
=========
* Fixed INI updater.

1.0.0.70
=========
* Messed up version info and INI file in previous release.

1.0.0.68
=========
* Removed sections from INI file for episode handling.
* Added new section to INI file to allow user to add more "garbage" content to strip from folder names.

1.0.0.67
=========
* Made a couple changes to logging.
* Added new section to INI file for Minimum File Size.

1.0.0.66
=========
* Added DVDScr to garbage list.
* Updated download links.

1.0.0.65
=========
* Fixed code error where arguments were still being passed to user defined program even when option was disabled.

1.0.0.64
=========
* Added "IMAX Edition" to special release types.
* Added "HDRip" to garbage string list.
* Added graceful exit with error code for instances where destination directory is missing or not found.

1.0.0.63
=========
* Noticed that we're still getting an extra space before the comma when it's a special edition with "The" or "A" renaming enabled.
* Added 480p/i and 810p/i to garbage strings to remove.

1.0.0.62
=========
* Added ability to add user defined category.
* Added option to not have year added to file/folder name.
* Added ability to run another script or program after processing completes.
* I think I finally fixed the stupid Array error once and for all.
* Adjustment to date processing to catch spaces.
* Built in some logic for catching correct file when extra garbage is packaged with release.

1.0.0.61
=========
* Adjusted way dates are checked to account for shorter titles.
* Now removes underscores while removing dots.

1.0.0.60
=========
* v59 still had my testing variables hard-coded. Fixed in v60.

1.0.0.59
=========
* Changed some code to account for issues when users have Movie Sorting enabled in Sab.

1.0.0.58
=========
* Fixed issue with nested releases failing to process (e.g. MacGuffin releases).

1.0.0.57
=========
* Simple bug fixes for renaming due to previous changes.

1.0.0.56
=========
* Added "SE", "Special Edition", "Theatrical/Theatrical Cut", and "Alternate/Alternative Ending" to list of special release types (unrated, director's cut, etc.).
* Per user request, changed the configuration to allow running of application outside of default Sab directory.

1.0.0.55
=========
* Found another array error I thought I fixed in 1.0.0.53 (whoops!).

1.0.0.54
=========
* Fixed issue for titles with both "The|A" in the beginning AND "Unrated|Extended|Directors Cut" not formatting correctly.
* A few logging changes.
* Added ability to view change log (this file) when an update is downloaded.

1.0.0.53
=========
* Fixed issue with Array Sorting for split AVI files (was causing some releases to combine files backwards).

1.0.0.52
=========
* Implemented INI settings import for updates.
* Added IniUpdate.exe to archive for manual use.
* Implemented renaming folders with "A". Updated INI to v1.0.0.03 for change.

1.0.0.51
=========
* Implemented renaming folders with "The". Updated INI to v1.0.0.02 for change.
* Fixed handling of titles with dates already contained within parentheses.

1.0.0.50
=========
* Implemented season naming format. Updated INI to v1.0.0.01 for changes.

1.0.0.49
=========
* Fixed bug with file deletion, causing array error I thought corrected in 1.0.0.47.

1.0.0.48
=========
* Fixed issue with dots in download/job name.

1.0.0.47
=========
* Fixed issue with mencoder outputting to logfile.
* Added check to test that categories defined in YoVanilla.ini match those in Sabnzbd.
* Fixed choking on array for AVI files.
* Added another filter to watch for when renaming ('internal').
* Added code to clean up download folder names in case Sab isn't configured to remove dots.
* Removed x64 version.

1.0.0.46
=========
* Maintenance release for some script clean-up and better debugging support.

1.0.0.42
=========
* Changed build to cooperate better when run from command line. Should result in fewer variable errors.
* Compiled an x64 version. Not sure this was necessary, but I did it while trying to address errors encountered while testing.
Last edited by NoTolerance on December 27th, 2016, 11:28 am, edited 19 times in total.
kvn180
Newbie
Newbie
Posts: 4
Joined: July 2nd, 2012, 3:48 pm

Re: [Windows] YoVanilla: Movie and Documentary Post-Processi

Post by kvn180 »

I'm using this script, but in a different way than you intended. I only have one Movies category and your folder and file renaming works great for it!
One question: Is it also possible to have the post processing on the default category? I tried to enter Default but it wouldn't recognize it.

Great work! This script has made movie downloading much easier!
NoTolerance
Full Member
Full Member
Posts: 127
Joined: June 27th, 2012, 9:55 am

Re: [Windows] YoVanilla: Movie and Documentary Post-Processi

Post by NoTolerance »

At the top of your category list in Sab, you can set the script for the 'Default' category. You'd then have to edit the YoVanilla.ini and set HDCat, SDCat, or DocCat to = Default. I'm not sure how useful my script would be for that, though, unless all you're downloading is movies. My script would choke on an application or ebook download, for example. It wouldn't know how to process the files.

Glad the script is working for you. I've addressed a pretty major bug in the latest release.
kvn180
Newbie
Newbie
Posts: 4
Joined: July 2nd, 2012, 3:48 pm

Re: [Windows] YoVanilla: Movie and Documentary Post-Processi

Post by kvn180 »

Well TV is done by sickbeard, music by headphones. If I download apps or ebooks, I give them a category manually so you're script doesn't do anything with it.
I've made following config changes:

HDCat=Default
ComDir="D:\DOWNLOADS\TEMP SABNZBD"
HDDir="\\NAS\Volume_1\MOVIES"

However, when I use it.. Following shows in logfile:
Back With My Brand New Invention: v1.0.0.48
INI File Version: v1.0.0.00
An updated version is available: v1.0.0.49
Download from: https://dl.dropbox.com/u/12943123/YoVan ... 0_0_49.exe
Your INI File is current.
New Job: Extraterrestrial (2011) DD51 Custom NL-Xvid -UGR-
Making sure NZB was processed successfully...
NZB processing completed without error. Yo VIP! Let's kick it!
Renaming D:\DOWNLOADS\TEMP SABNZBD\Extraterrestrial (2011) DD51 Custom NL-Xvid -UGR-.1 to D:\DOWNLOADS\TEMP SABNZBD\Extraterrestrial (2011) DD51 Custom NL-Xvid -UGR- 1
Reading configuration options from D:\Software\SABnzbd\scripts\YoVanilla.ini
The categories you defined in the YoVanilla.ini don't match any of the catergories defined in Sabnzbd. Please review your settings. For now I'm just going to dump the files into the D:\DOWNLOADS\TEMP SABNZBD folder if I can! Otherwise, you're SOL.
Processing as an UNKNOWN - Non-matching categories set.
Processing "Extraterrestrial ((2011)) Dd51 Custom Nl-Xvid -Ugr-"
Preparing to clean up files...
Looking for D:\DOWNLOADS\TEMP SABNZBD\Extraterrestrial (2011) DD51 Custom NL-Xvid -UGR- 1
Preparing to rename and move files...
Renaming/Moving D:\DOWNLOADS\TEMP SABNZBD\Extraterrestrial (2011) DD51 Custom NL-Xvid -UGR- 1\ET(2011)SUB INSTELBAAR.avi to D:\DOWNLOADS\TEMP SABNZBD\Extraterrestrial ((2011)) Dd51 Custom Nl-Xvid -Ugr-\Extraterrestrial ((2011)) Dd51 Custom Nl-Xvid -Ugr-.avi SUCCEEDED! Now deleting...
Deleting D:\DOWNLOADS\TEMP SABNZBD\Extraterrestrial (2011) DD51 Custom NL-Xvid -UGR- 1 SUCCEEDED!
Yo man - let's get out of here. Word to your mother.
There is an update available. Please review the log.

When I set category to Movies and I manually change it, it works fine. Sure this feature is available with Yovanilla?
NoTolerance
Full Member
Full Member
Posts: 127
Joined: June 27th, 2012, 9:55 am

Re: [Windows] YoVanilla: Movie and Documentary Post-Processi

Post by NoTolerance »

Did you set this also:

Image
Last edited by NoTolerance on April 20th, 2015, 12:00 pm, edited 2 times in total.
kvn180
Newbie
Newbie
Posts: 4
Joined: July 2nd, 2012, 3:48 pm

Re: [Windows] YoVanilla: Movie and Documentary Post-Processi

Post by kvn180 »

Yes I did.
And the script works, but it doesn't recognize Default as a category so doesn't move it to a different folder.
Logs says:
The categories you defined in the YoVanilla.ini don't match any of the catergories defined in Sabnzbd. Please review your settings. For now I'm just going to dump the files into the D:\DOWNLOADS\TEMP SABNZBD folder if I can! Otherwise, you're SOL.

But it's not that big of a deal.. I'll just have to be a bit less lazy than I had planned for ;) Thanks!
NoTolerance
Full Member
Full Member
Posts: 127
Joined: June 27th, 2012, 9:55 am

Re: [Windows] YoVanilla: Movie and Documentary Post-Processi

Post by NoTolerance »

I'm guessing that's a limitation with Sab. It probably doesn't pass the "Default" category on the command line. I might do some testing later to see.
jcvmw
Newbie
Newbie
Posts: 4
Joined: April 27th, 2012, 7:27 am

Re: [Windows] YoVanilla: Movie and Documentary Post-Processi

Post by jcvmw »

I've installed your script and really like the idea of it, I just can't get it to work for me, but that is my fault. It downloads the movies into C:media\movies\movie\title2012, but it wont move them over to the selected folders or categories, so I know I have done something wrong but not smart enough to figure that out. Can you please help me with this?

Thanks.
Craig
NoTolerance
Full Member
Full Member
Posts: 127
Joined: June 27th, 2012, 9:55 am

Re: [Windows] YoVanilla: Movie and Documentary Post-Processi

Post by NoTolerance »

Either post or email me (see the first post for the address) your logfile if you have logging enabled, or copy/paste the output from Sab.
jamesjfa
Jr. Member
Jr. Member
Posts: 50
Joined: June 15th, 2012, 9:37 pm

Re: [Windows] YoVanilla: Movie and Documentary Post-Processi

Post by jamesjfa »

Hello. I applied your script to my movie category. It will rename them properly but when it comes to joining the two avi files, it put them back to front. CD2 plays before CD1. Here is the output from the log:

2012-07-31 21:06 - Back With My Brand New Invention: v1.0.0.52
2012-07-31 21:06 - INI File Version: v1.0.0.03
2012-07-31 21:06 - You're running the current version.
2012-07-31 21:06 - Your INI File is current.
2012-07-31 21:06 - New Job: An Officer And A Gentleman 1982 WS DVDRip XviD iNT EwDp
2012-07-31 21:06 - Making sure NZB was processed successfully...
2012-07-31 21:06 - NZB processing completed without error. Yo VIP! Let's kick it!
2012-07-31 21:06 - Reading configuration options from C:\Program Files\SABnzbd\scripts\YoVanilla.ini
2012-07-31 21:06 - Looks like an SD movie.
2012-07-31 21:06 - Processing as an SD movie.
2012-07-31 21:06 - No parentheses.
2012-07-31 21:06 - DocTitle stripped is: An Officer And A Gentleman
2012-07-31 21:06 - DocTitle formatted is: An Officer And A Gentleman (1982)
2012-07-31 21:06 - Folder is An Officer And A Gentleman (1982)
2012-07-31 21:06 - Processing "An Officer And A Gentleman (1982)"
2012-07-31 21:06 - Preparing to clean up files...
2012-07-31 21:06 - Looking for D:\Movies\An Officer And A Gentleman 1982 WS DVDRip XviD iNT EwDp
2012-07-31 21:06 - Deleted ewdp-aoaag.sample.avi
2012-07-31 21:06 - Preparing to rename and move files...
2012-07-31 21:06 - Files joined successfully!
2012-07-31 21:06 - Deleting D:\Movies\An Officer And A Gentleman 1982 WS DVDRip XviD iNT EwDp SUCCEEDED!
2012-07-31 21:06 - Yo man - let's get out of here. Word to your mother.
NoTolerance
Full Member
Full Member
Posts: 127
Joined: June 27th, 2012, 9:55 am

Re: [Windows] YoVanilla: Movie and Documentary Post-Processi

Post by NoTolerance »

I emailed you a link to a version to test out. Let me know if that resolves the issue and if it does, I'll publish the release.
jamesjfa
Jr. Member
Jr. Member
Posts: 50
Joined: June 15th, 2012, 9:37 pm

Re: [Windows] YoVanilla: Movie and Documentary Post-Processi

Post by jamesjfa »

Thank you. I will test it out today and let you know.
jamesjfa
Jr. Member
Jr. Member
Posts: 50
Joined: June 15th, 2012, 9:37 pm

Re: [Windows] YoVanilla: Movie and Documentary Post-Processi

Post by jamesjfa »

Thank You it works now. Great job
sactowilly
Newbie
Newbie
Posts: 1
Joined: August 11th, 2012, 9:39 am

Re: [Windows] YoVanilla: Movie and Documentary Post-Processi

Post by sactowilly »

Maybe I'm not getting it, but I've tried two different ways and have had no luck with it moving my kid's movies and shows to folders I want... just the default ones.

Here are my sabnzbd cats:

Image

Here is what I have in the .ini:

Code: Select all

;===========================================================================
;	User-Defined Categories from Sabnzbd
;	Taken from "Category" column under Config - Categories
;	MUST MATCH EXACTLY
;===========================================================================
;	Documentary Category:
DocCat=documentaries

;	HD Movie (x264) Category:
HDCat=noahmovies

;	SD Movie (DivX/XviD) Category:
SDCat=noahshows


;THIS IS WHAT I ADDED BUT NO LUCK, SO I MODIFIED
;THE ABOVE HOPING THAT WOULD WORK.... IT DID NOT
;      Noah's Category
; noahmovies=noahmovies
; noahshows=noahshows

[Paths]
;===========================================================================
; Full path to Log File directory - no trailing backslash
;===========================================================================
LogDir="C:\Program Files\SABnzbd\scripts\logs"

;===========================================================================
;	Full path for 'complete' directory from Sab
;===========================================================================
ComDir="C:\Users\XXXXXXXXXXXX\Documents\Downloads\complete"

;===========================================================================
; Full path where final folders should be created - no trailing backslashes
;===========================================================================
; Documentaries:
DocDir="D:\Media\Documentaries"

; x264 HD Movies:
HDDir="E:\Noah"

; DivX/XviD Movies:
SDDir="H:\Noah Shows"


; SAME HERE ... TIRED THEM AND THEY DID NOT WORK
; SO I MODIFIED ABOVE AND STILL NO LUCK
;noahshows="H:\Noah Shows"
;noahmovies="E:\Noah"
And here is what I get from sabnzbd:
Back With My Brand New Invention: v1.0.0.52
INI File Version: v
New Job: MOVIENAME DVDRip
Making sure NZB was processed successfully...
NZB processing completed without error. Yo VIP! Let's kick it!
Reading configuration options from C:\Program Files\SABnzbd\scripts\YoVanilla.ini
You didn't define categories in the configuration file! I'm just going to dump the files into the C:\Program Files\SABnzbd\downloads\complete folder if I can! Otherwise, you're SOL.
Processing as an UNKNOWN - No categories set.
No nfo file found.
Folder is MovieName
Processing "MovieName"
Preparing to clean up files...
Looking for C:\Users\XXXXXXXXXXXX\Documents\Downloads\complete\Noah Movies\MOVIENAME DVDRip
Preparing to rename and move files...
Renaming/Moving C:\Users\XXXXXXXXXXXX\Documents\Downloads\complete\Noah Movies\MOVIENAME DVDRip\moviename.avi to C:\Program Files\SABnzbd\downloads\complete\MovieName\MovieName.avi SUCCEEDED! Now deleting...
Deleting C:\Users\XXXXXXXXXXXX\Documents\Downloads\complete\Noah Movies\MOVIENAME DVDRip SUCCEEDED!
Yo man - let's get out of here. Word to your mother.
Any suggestions?

Thank you.
Last edited by sactowilly on August 11th, 2012, 12:06 pm, edited 1 time in total.
Post Reply