I’ve been trying to use the Generate Cuesheet plug-in that is on the standard list of plug-ins.
It creates a .cue file, but one line of the generated file is missing a value for MUSICBRAINZ_ALBUM_ID.
The snipit of code is below
t.set(“PERFORMER”, album.metadata[“albumartist”])
t.set(“TITLE”, album.metadata[“album”])
t.set(“REM”, “MUSICBRAINZ_ALBUM_ID”, album.metadata[“musicbrainz_albumid”])
t.set(“REM”, “MUSICBRAINZ_ALBUM_ARTIST_ID”, album.metadata[“musicbrainz_albumartistid”])
if “date” in album.metadata:
t.set(“REM”, “DATE”, album.metadata[“date”])
The output created for one particular CD is:
PERFORMER “Simon & Garfunkel”
TITLE “Live 1969”
REM MUSICBRAIN_ALBUM_ID
REM MUSICBRAIN_ALBUM_ARTIST_ID 5d02f264-e225-41ff-83f7-d9b1f0b1874a
REM DATE 2008
so, it appears the album.metadata[musicbrainz_albumid] has no value set.
The viewvariables plug-in shows the correct value for musicbrainz_albumid
TITLE “Live 1969”
REM MUSICBRAINZ_ALBUM_ID dbd910e8-b450-41b3-9fc7-7e9273259d0d
REM MUSICBRAINZ_ALBUM_ARTIST_ID 5d02f264-e225-41ff-83f7-d9b1f0b1874a
REM DATE 2008
My guess is that the comment was blank for that release, so your one-line script was overwriting musicbrainz_albumid with an empty string. If you want to keep the one-liner, you should change it to:
In the best case that will set the album ID to an empty value, causing Picard not to store the ID in the tags. One implication of that is that when you load the files again into Picard they won’t get automatically loaded to the proper release.
Worst case is the comment is actually set to something (but not the release ID). Then the value might break some software expecting an MBID in this tag.
Hi
comment has a value, and both versions of the script break Generate Cuesheet. I notice that in Picard, when I click on the album, musicbrainz_albumid is not listed, but musicbrainz_releaseid is shown:
I don’t understand this. If comment has a value, then it will set the ID?
Yes, understood. Just a hack for now.
I control its setting and I understand your concerns, but for now comment is not empty and looking at the output of viewvariables, %musicbrainz_albumid% has a value, but nothing is output… Is it related?
It works. So, thanks for the fix. Note that in both scenarios above comment has a value. So musicbrainz_albumid would have had a value. Is there a version of viewscript variables at the album level?
The problem with your original script is that the comment is always empty for data loaded from MusicBrainz. Internally Picard has metadata on both the album and the track level.When this gets freshly loaded from MB there is no comment, so your script was clearing the album ID both on album and track level.
Only when a file with existing comment gets attached to the track then musicbrainz_album_id will have a value again. However, this does not heal the value on album level, but that’s what the cursheet module writes.
No, that only works on track / file level currently.