Package: ripit Version: 4.0.0~beta20140508-1 Tags: patch Severity: wishlist
As mentioned in bug #836539, it would be useful if ripit would add the musicbrainz ID it used to find information about a CD when ripping. I rip to FLAC, and noticed this information is missing. I also noticed the genre tag is always Unknown, which is completely useless. Here is a patch to only set the genre tag in FLAC files when its value is useful, and set the catalog number and musicbrainz albumid when those values are known. With this patch in place, picard will automatically pick up the correct musicbrainz entry and fill in the rest of the tags when I use it to update the tagging of ripped files. I guess a similar patch should be added for all the formats ripit understand, but I do not really know the code enough to try to do it myself. The tag mapping used by picard is found in <URL: https://picard.musicbrainz.org/docs/mappings/ >. --- /usr/bin/ripit.orig 2016-03-01 13:33:57.000000000 +0100 +++ /usr/bin/ripit 2016-09-04 23:08:53.403568068 +0200 @@ -5556,6 +5556,12 @@ if($va_flag > 0); $flacopt .= " --tag=CATEGORY=\"$categ\"" if(defined $categ and $categ ne ""); + $flacopt .= " --tag=GENRE=\"$genre_tag\"" + if(defined $genre_tag && "Unknown" ne $genre_tag); + $flacopt .= " --tag=MUSICBRAINZ_ALBUMID=\"$cd{mbreid}\"" + if(defined $cd{mbreid}); + $flacopt .= " --tag=CATALOGNUMBER=\"$cd{catalog}\"" + if(defined $cd{catalog}); if($coverart[$c] == 1 && -f "$coverpath" && -s "$coverpath") { if($coverpath =~ /[|\\\\:*?\$]/) { $covertag = "--picture=/tmp/ripit-flac-cov-$$.jpg"; @@ -5579,7 +5585,6 @@ --tag=TITLE=\"$tracktag\" \\ --tag=ARTIST=\"$artistag\" --tag=ALBUM=\"$albumtag\" \\ --tag=DATE=\"$year\" --tag=TRACKNUMBER=\"$tagtrackno\" \\ - --tag=GENRE=\"$genre_tag\" \\ --tag=DESCRIPTION=\"$commentag\" --tag=CDID=\"$cddbid\" \\ $covertag \\ $flactags \\ -- Happy hacking Petter Reinholdtsen