Bug 19 - trackspec works from commandline, fails from config
Summary: trackspec works from commandline, fails from config
Status: CONFIRMED
Alias: None
Product: abcde
Classification: Unclassified
Component: Ripping (show other bugs)
Version: unspecified
Hardware: All All
: Normal minor
Assignee: Steve McIntyre
URL:
Depends on:
Blocks:
 
Reported: 2015-11-03 23:41 GMT by Tom Roche
Modified: 2015-11-04 00:10 GMT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Roche 2015-11-03 23:41:20 GMT
As currently indicated @ https://wiki.debian.org/Ripping#handling_broken_tracks , `abcde` currently has problems "doing the right thing" with broken tracks. As noted @ FR_URI_HERE , users currently cannot tell `abcde` to "just rip the tracks you can." Fortunately, users *can* currently specify track-to-rip from the `abcde` commandline (via what I am calling a "trackspec"), as long as they clear the hurdle noted @ http://abcde.einval.com/bugzilla/show_bug.cgi?id=18 . However, they cannot currently (and oddly) successfully give the same trackspec from a config file. I note

# start example 0-----------------------------------------------------
$ abcde -c ~/.config/abcde/abcde-MP3.conf
> Looking at EXTRAVERBOSE ()
> Grabbing entire CD - tracks: 01 02 03 04 05 06 07 08 09 10 11
...

# Unfortunately this CD is scratched :-( causing `abcde` or `cdparanoia` to hang until killed:
> Grabbing track 10: Neptune (The Planet)...
> cdparanoia III release 10.2 (September 11, 2008)

> Ripping from sector  183670 (track 10 [0:00.00])
>           to sector  208479 (track 10 [5:30.59])

> outputting to /home/me/abcde.ZixoEptDp9A6DJAhBhu6trztHl4-/track10.wav

>  (== PROGRESS == [               + +V+>         | 199125 00 ] == :-P 0 ==)   ^C

# So (having failed to RTF commandline help), I try to tell `abcde` to rip track#=11:

$ diff -uwB ~/.config/abcde/abcde-MP3.conf ~/.config/abcde/abcde-MP3-junk_error_correction.conf
> --- /home/me/.config/abcde/abcde-MP3.conf                        2015-10-31 17:03:29.021190560 -0700
> +++ /home/me/.config/abcde/abcde-MP3-junk_error_correction.conf  2015-10-31 17:03:03.161514312 -0700
> @@ -1,4 +1,7 @@
> -### adapted from http://www.andrews-corner.org/abcde.html#mp3 by Andrew Strong
> +### Adapted from ~/.config/abcde/abcde-MP3.conf
> +### Sole non-comment change is 
> +### - CDPARANOIAOPTS="--never-skip=10"
> +### + CDPARANOIAOPTS="--never-skip=10 11"
> 
>  # Specify the method to use to retrieve the track information: consider setting 'musicbrainz' instead, which is my own preferred option
>  # CDDBMETHOD=cddb
> @@ -22,7 +25,9 @@
> 
>  # Give the location of the ripping program and pass any extra options:
>  CDPARANOIA=cdparanoia
> -CDPARANOIAOPTS="--never-skip=10"
> +#CDPARANOIAOPTS="--never-skip=10"
> +# rip only track#=11 (1-9=previously ripped, 10=defective)
> +CDPARANOIAOPTS="--never-skip=10 11"
> 
>  # Give the location of the CD identification program:
>  CDDISCID=cd-discid

$ abcde -c ~/.config/abcde/abcde-MP3-junk_error_correction.conf
...
> Edit selected CDDB data [y/N]? N 
> Is the CD multi-artist [y/N]? N
> Creating playlist...
> Erase, Append to, or Keep the existing playlist file? [e/a/k] (e): 
> Grabbing track 01: 1979 Semi-Finalist...

# That message is wrong, but fortunately `cdparanoia` DWIM:

> cdparanoia III release 10.2 (September 11, 2008)
>
> Ripping from sector  208480 (track 11 [0:00.00])
>           to sector  235634 (track 11 [6:02.04])
>
> outputting to 01

# That filename-handling is also wrong.

>  (== PROGRESS == [                              | 235634 00 ] == :^D * ==)   
>
> Done.

# So the file rips correctly! except `abcde` fails:

> [ERROR] abcde: The following commands failed to run:
> readtrack-01: cdparanoia --never-skip=10 11 returned code 73
> Finished. Not cleaning /home/me/abcde.ZixoEptDp9A6DJAhBhu6trztHl4-.

#   end example 0-----------------------------------------------------

I'm guessing (being somewhat daunted by the prospect of reading a bash script with |lines| > 4500) that `abcde` is just choking on the non-zero retval (or "errorcode," except in this case there's no apparent error. I'm guessing that partly because of tail(example 0), but also because example 1 succeeds:

# start example 1----------------------------------------------------

# after reading `abcde -h`: thanks, Alan W. Kerr

me@it:~$ abcde -c ~/.config/abcde/abcde-MP3.conf 11
> Looking at EXTRAVERBOSE ()
> Grabbing tracks: 11
> abcde: attempting to resume from /home/me/abcde.ZixoEptDp9A6DJAhBhu6trztHl4-..
> Creating playlist...
> Grabbing track 11: Iron Man...
> cdparanoia III release 10.2 (September 11, 2008)

> Ripping from sector  208480 (track 11 [0:00.00])
>         to sector  235634 (track 11 [6:02.04])

> outputting to /home/me/abcde.ZixoEptDp9A6DJAhBhu6trztHl4-/track11.wav

>  (== PROGRESS == [                              | 235634 00 ] == :^D * ==)   

> Done.

> Encoding track 11 of 11: Iron Man...
> Tagging track 11 of 11: Iron Man...
> Finished.

#   end example 1----------------------------------------------------

YMMV (if so, consider making this an FR), but my contention is that specifying the same trackspec in the config file should succeed identically.
Comment 1 Tom Roche 2015-11-04 00:10:10 GMT
s|FR_URI_HERE|http://abcde.einval.com/bugzilla/show_bug.cgi?id=20|g