When I use Discogs.src to get the tags for Discogs Release ID 996990, the output to the MEDIATYPE field is "CD". I would expect it to be "CD, Album, Reissue", since the code in Discogs.src explicitly selects the values in descriptions.
many thanks for bringing this to my attention — it's indeed not correct. A good way to also output the descriptions (while at the same time making clear that it's not the actual format) would be:
# Media Type
outputto "MEDIATYPE"
json_foreach "formats"
json_select "name"
sayrest
json_select_array "descriptions" -1 ", "
ifnot ""
say " ("
sayrest
say ")"
endif
json_foreach_end
What do you mean by "... (while at the same time making clear that it's not the actual format) ..."? I just generated a new debug.txt - the format is exactly as displayed in the original post. Or did I get something wrong here?
Your solution works quite nicely and I think, it should become part of the next official discogs.src. I'll keep an eye on the output of the new code while tagging other records.
It's just a little bit different, but it's only a minor change: I've but the format descriptions in brackets to distinguish the actual format from the descriptions