From bbfcaee576de9f61e835a7be3574ffc14c6ed2eb Mon Sep 17 00:00:00 2001 From: mdb Date: Sat, 19 Jan 2002 04:35:25 +0000 Subject: [PATCH] Don't abort the whole ripping process if one track fails to rip. Also report the branchdir and entryid at the completion of the importing process so that the user can rerip particular tracks if necessary. git-svn-id: https://samskivert.googlecode.com/svn/trunk@536 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../src/java/robodj/importer/RipPanel.java | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/projects/robodj/src/java/robodj/importer/RipPanel.java b/projects/robodj/src/java/robodj/importer/RipPanel.java index f539a5db..8d47a8eb 100644 --- a/projects/robodj/src/java/robodj/importer/RipPanel.java +++ b/projects/robodj/src/java/robodj/importer/RipPanel.java @@ -1,5 +1,5 @@ // -// $Id: RipPanel.java,v 1.4 2001/03/22 02:45:13 mdb Exp $ +// $Id: RipPanel.java,v 1.5 2002/01/19 04:35:25 mdb Exp $ package robodj.importer; @@ -121,15 +121,29 @@ public class RipPanel // rip the track _encoding = false; + // it takes a second or so for the ripper to start // reporting progress, so we clear out the progress // indicator so that the 100% progress of the previous // track doesn't look like it applies to this new track // while we're spinning up updateProgress(0); + + // start the ripping postAsyncStatus("Ripping track " + _track + "..."); String tpath = createTempPath(_track, "wav"); - ripper.ripTrack(_info, _track, tpath, this); + try { + ripper.ripTrack(_info, _track, tpath, this); + + } catch (Exception e) { + String errmsg = "Failure occurred while ripping track " + + _track + ". Attempting to encode anyway. You can " + + "try re-ripping this track later with the " + + "'quickrip' script provided with the importer. The " + + "branchdir and entryid needed by quickrip will be " + + "reported at the completion of the ripping process."; + postAsyncStatus(errmsg); + } // then encode it _encoding = true; @@ -234,6 +248,9 @@ public class RipPanel } } + // report the branch directory + postAsyncStatus("Branch directory: " + hash); + // fill in the entry source since we ripped this from CD _entry.source = Importer.ENTRY_SOURCE; @@ -267,6 +284,9 @@ public class RipPanel "directory: " + tpath); } + // report the entry id + postAsyncStatus("Entry ID: " + _entry.entryid); + postAsyncStatus("Moving tracks into repository directory."); // move the tracks into the target directory tpath.append("/");