From 15d05a12674b2e2341ae638edbd77adc22a0deb9 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Wed, 2 Jun 2010 15:20:17 +0000 Subject: [PATCH] Add preset override for anamorphic to manicure so when presets are regenerated the next time we don't loose the overrides git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3347 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- scripts/manicure.rb | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/scripts/manicure.rb b/scripts/manicure.rb index 317ea05aa..7adc98e88 100755 --- a/scripts/manicure.rb +++ b/scripts/manicure.rb @@ -84,7 +84,8 @@ class Presets homeLocation = `echo $HOME`.chomp # Use that to build a path to the presets .plist - inputFile = homeLocation+'/Library/Application Support/HandBrake/UserPresets.plist' + #inputFile = homeLocation+'/Library/Application Support/HandBrake/UserPresets.plist' + inputFile = homeLocation+'/UserPresets.plist' # Parse the presets into hashes @hashMasterList = Plist::parse_xml( inputFile ) @@ -969,12 +970,17 @@ class Display end #Anamorphic - if hash["PicturePAR"] == 1 - commandString << "anamorphic_mode = 1;\n " - elsif hash["PicturePAR"] == 2 - commandString << "anamorphic_mode = 2;\n " - elsif hash["PicturePAR"] == 3 - commandString << "anamorphic_mode = 3;\n " + if hash["PicturePAR"] != 0 + commandString << "if( !anamorphic_mode )\n " + commandString << "{\n " + if hash["PicturePAR"] == 1 + commandString << " anamorphic_mode = 1;\n " + elsif hash["PicturePAR"] == 2 + commandString << " anamorphic_mode = 2;\n " + elsif hash["PicturePAR"] == 3 + commandString << " anamorphic_mode = 3;\n " + end + commandString << "}\n " end #Booleans -- 2.40.0