0

I'm starting the longish process of ripping my CD collection. I've got abcde installed with the config from Andrew's Corner. It seems to be working ok but when the metadata fetch fails, the MP3s get written as Unknown Artist and Unknown Album. Which isn't a problem until the second metadata fetch fails. Then the tracks get overwritten. What would be ideal is that the second album gets a number on the name like "Unknown Album 2". Any suggestions on how to accomplish this? Or how to keep the directories from being ovewritten?

  • Serge's answer is best, but a hack is to add the -W1 option. This treats discs as multi CD sets. If a duplicate disc set is found, then the current one is incremented to triple-digits (track 101 instead of 1, for example). – Klaatu von Schlacker Jun 6 '16 at 0:09
  • 1
    I think the intended usage is that when an unknown cd is found you are prompted to edit the cddb file with the right titles/artist, then abcde carries on with this new info. The altruistic thing to do is to also get abcde to submit the result to freedb which has provided you with info for all the other cds. – meuh Jun 6 '16 at 6:18
2
#!/bin/bash

id=$cd-discid /dev/cdrom
abcde $@ || exit 1
if [ -d "Unknown Artist/Unknown Album" ]; then
       mkdir "Unknown Artist/Unknown Album $id"
       mv "Unknown Artist/Unknown Album"/* "Unknown Artist/Unknown Album $id"
fi
0

Using Serge's idea above, I edited the mungefilename function in the .abcde.conf configuration file.

I started with the configuration file supplied here: Andew's Corner has a very helpful tutorial

I edited the function to append the first bit of string returned from cd-discid.

mungefilename ()
    {
        CDDISKIDENT=$(cd-discid "$CDROM")

        FIRSTPARTID=$(echo $CDDISKIDENT | cut -d' ' -f1)
  echo "$@" | sed "s/Unknown\ Album/Unknown\ Album$FIRSTPARTID/" | sed -e 's/^\.*//' | tr -d ":><|*/\"'?[:cntrl:]"
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.