From: Alan J. Pippin <alan@pippins.net>
Date: Wed, 1 Feb 2012 04:44:44 +0000 (-0700)
Subject: Added libdvdcss2 install info to README
X-Git-Url: http://git.pippins.net/images/%27%20.%20%24this-%3Ephpgw_js_url%20.%20%27/jscalendar/%24link?a=commitdiff_plain;h=168c2c032aabdb5dc40e67adbd4c49c57835c741;p=rip_dvd%2F.git

Added libdvdcss2 install info to README
Fixed MKV DVD image making code when moving ripped mkv files into place.
---

diff --git a/README b/README
index f2f3320..2516b79 100644
--- a/README
+++ b/README
@@ -4,7 +4,10 @@ DEPENDENCIES
 The following packages need to be installed on your system:
 
 Package Dependencies (apt-get install these for example):
-lsdvd dvdauthor gddrescue dvdbackup tovid mencoder mplayer genisoimage libdvdcss2 gpac ogmtools
+lsdvd dvdauthor gddrescue dvdbackup tovid mencoder mplayer genisoimage gpac ogmtools
+
+The libdvdcss2 package is also needed, but can only be downloaded from the medibuntu repository:
+https://help.ubuntu.com/community/Medibuntu
 
 NOTE:  In Ubuntu, depending on your version, replace libdvdcss2 with what you find on this page.
   https://help.ubuntu.com/community/RestrictedFormats/PlayingDVDs
diff --git a/rip_dvd b/rip_dvd
index e096655..af108dd 100755
--- a/rip_dvd
+++ b/rip_dvd
@@ -1157,7 +1157,7 @@ function make_dvd_mkv_image {
 
     echo -e "\n   Ripping: $makemkv --minlength=$min_length --decrypt --progress=-same $srctype:$srcname all $dstdir"
     mkdir -p "$dstdir"
-    $makemkv mkv --minlength=$min_length --decrypt --progress=-same $srctype:$srcname all $dstdir
+    $makemkv mkv --minlength=$min_length --decrypt --progress=-same $srctype:$srcname all $dstdir 2>&1 | tee -a "$ddrescuelog"
     makemkv_retval=$?
     
     if [ $makemkv_retval != 0 ]; then
@@ -1165,8 +1165,13 @@ function make_dvd_mkv_image {
     fi
 
     # Move the created MKV file into place
-    echo -e "\n   Moving $dstdir/*.mkv -> $dstmkv"
-    mv "$dstdir"/*.mkv "$dstmkv"
+    dstfile=${dstmkv%.[^.]*}
+    typeset -i num=0
+    for i in `/bin/ls -1 "$dstdir"/*.mkv`; do
+	echo -e "\n   Moving $i -> $dstfile.$num.mkv" | tee -a "$ddrescuelog"
+	mv "$i" "$dstfile.$num.mkv"
+	((num = num + 1 ))
+    done
     if [ $? != 0 ]; then
 	fatal_and_exit "-E- Unhandled mv error"
     fi
@@ -1175,7 +1180,7 @@ function make_dvd_mkv_image {
     fi
 
     # Concatenate the encode log to our main log file, greping out unwanted lines
-    cat $encodelog | grep -v "Current progress:" >> "$logfile"    
+    cat "$ddrescuelog" | grep -v "Current progress:" >> "$logfile"    
 }
 
 function make_dvd_mkv_image_from_folder {