aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--miragextract.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/miragextract.c b/miragextract.c
index 3719f2a..766d9c5 100644
--- a/miragextract.c
+++ b/miragextract.c
@@ -81,7 +81,7 @@ void extract_track(int t, int extract) {
struct SF_INFO sfi;
int bytes = 0;
- printf(" Track %d (%d): ", t + 1, output_track_number);
+ printf(" %d (-t %d): ", t + 1, output_track_number);
if(!(track = mirage_session_get_track_by_index(session, t, NULL)))
die("can't read track");
@@ -287,7 +287,7 @@ int main(int argc, char **argv) {
if(!(session = mirage_disc_get_session_by_index(disc, s, NULL)))
die("couldn't read session");
- printf("Session %d\n", s + 1);
+ printf("Session %d tracks:\n", s + 1);
for(t = 0; t < mirage_session_get_number_of_tracks(session); t++) {
int extract = 0;
@@ -298,9 +298,15 @@ int main(int argc, char **argv) {
extract_track(t, extract);
}
+ if(!t) printf(" (no tracks in session)\n");
+ g_object_unref(session);
}
+ g_object_unref(disc);
+ g_object_unref(mirage);
mirage_shutdown(NULL);
+
printf("Total size: %d bytes (%sMB)\n", total_bytes, human_mb(total_bytes));
+
return 0;
}