Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > plf-free-src > by-pkgid > 8145dbd76ffb887cf2f5d76ce1636315 > files > 5

dvdrip-0.98.11-2.src.rpm

--- dvdrip-0.98.10/lib/Video/DVDRip/Config.pm.css	2009-02-22 19:49:03.000000000 +0100
+++ dvdrip-0.98.10/lib/Video/DVDRip/Config.pm	2009-02-23 13:05:38.636594435 +0100
@@ -342,6 +342,14 @@
               ."to the notebook pages. dvd::rip needs to be restarted "
               ."to take effect"
     },
+
+	dvdcss_method => {
+		label => "libdvdcss method",
+		type  => 'string',
+		value => 'title',
+		presets => ['title', 'key', 'disc'],
+		onload => sub { $ENV{DVDCSS_METHOD} = $_[0] }
+	},
 );
 
 my @CONFIG_ORDER = (
@@ -373,6 +381,7 @@
             default_preset
             default_subtitle_grab
             workaround_nptl_bugs nptl_ld_assume_kernel
+	    dvdcss_method
             )
     ],
 );
@@ -789,6 +798,20 @@
     return $actual ne $saved;
 }
 
+sub clone {
+    my $self = shift;
+
+    my $save_code_ref = delete $self->{config}->{dvdcss_method}->{onload};
+
+    require Storable;
+    my $clone = Storable::dclone($self);
+
+    $self->{config}->{dvdcss_method}->{onload} = $save_code_ref;
+    $clone->{config}->{dvdcss_method}->{onload} = $save_code_ref;
+
+    return $clone;
+}
+
 sub get_value {
     my $self   = shift;
     my ($name) = @_;
@@ -920,6 +943,7 @@
 sub test_burn_vcdimager_cmd   { _executable(@_) }
 sub test_burn_cdrdao_buffers  { _numeric_or_empty(@_) }
 sub test_cluster_master_port  { _numeric(@_) }
+sub test_dvdcss_method		{ _one_of_these (@_, ['disc','title','key'] ) }
 sub test_eject_command        { _executable(@_) }
 
 sub _executable {