improved release group display

This commit is contained in:
2025-07-22 16:14:23 +02:00
parent 47194034bf
commit fa7c37c7ab
4 changed files with 97 additions and 33 deletions

View File

@@ -1,23 +1,47 @@
BEGIN { OFS="\t" }
{
line_type=""
line_sectype=""
line_release=format_release
line_year=""
gsub("&", "\\\\&")
id = $1
type = $2
year = substr($3, 1, 4) + 0
title = $4
if (type == "Single")
line = format_single
else if (type == "Album")
line = format_album
else if (type == "EP")
line = format_ep
else
line = format_album
if (year)
line = line " " format_year
sub("<<title>>", title, line)
sub("<<year>>", year, line)
sectype = $3
year = substr($4, 1, 4) + 0
title = $5
switch (type) {
case "Single": line_type=format_single; break
case "Album": line_type=format_album; break
case "EP": line_type=format_ep; break
case "Broadcast": line_type=format_broadcast; break
case "Other": line_type=format_other; break
default: line_type="unknown type"
}
split(sectype, a, ";")
for (i in a) {
t=""
switch (sectype) {
case "Compilation": t=format_compilation; break
case "Soundtrack": t=format_soundtrack; break
case "Spokenword": t=format_spokenword; break
case "Interview": t=format_interview; break
case "Audiobook": t=format_audiobook; break
case "Audio drama": t=format_audiodrama; break
case "Live": t=format_live; break
case "Remix": t=format_remix; break
case "DJ-mix": t=format_djmix; break
case "Mixtape/Street": t=format_mixtape; break
case "Demo": t=format_demo; break
case "Field recording": t=fieldrec; break
}
if (t)
line_sectype=line_sectype ? line_sectype " / " t : t
}
sub("<<title>>", title, line_release)
line_year = year ? format_year : ""
sub("<<year>>", year, line_year)
sort = year ? year : 0
print sort, id, line
print line_type, line_sectype, line_release, line_year, sort, id
}