feat: detect local artists, rgs and releases
This commit is contained in:
@@ -1,8 +1,16 @@
|
||||
BEGIN { OFS="\t" }
|
||||
$2 == "Group" { name = format_group }
|
||||
$2 != "Group" { name = format_person }
|
||||
BEGIN {
|
||||
OFS="\t"
|
||||
local_artists[0] = 0
|
||||
delete local_artists[0]
|
||||
while ((getline < file_local_artists) == 1)
|
||||
local_artists[$1] = 1
|
||||
close(file_local_artists)
|
||||
}
|
||||
{
|
||||
gsub("&", "\\\\&")
|
||||
name = $2 == "Group" ? format_group : format_person
|
||||
if (local_artists[$1])
|
||||
name = format_local name
|
||||
if ($4)
|
||||
name = name " " format_disambiguation
|
||||
sub("<<disambiguation>>", $4, name)
|
||||
|
@@ -1,5 +1,11 @@
|
||||
BEGIN { OFS="\t" }
|
||||
|
||||
BEGIN {
|
||||
OFS="\t"
|
||||
local_releasegroups[0] = 0
|
||||
delete local_releasegroups[0]
|
||||
while ((getline < file_local_releasegroups) == 1)
|
||||
local_releasegroups[$1] = 1
|
||||
close(file_local_releasegroups)
|
||||
}
|
||||
{
|
||||
line_type=""
|
||||
line_sectype=""
|
||||
@@ -11,7 +17,9 @@ BEGIN { OFS="\t" }
|
||||
year = substr($4, 1, 4) + 0
|
||||
title = $5
|
||||
artistcredit = $6
|
||||
line_release = artist==artistcredit ? format_release : format_release_w_artist
|
||||
line_release = artist == artistcredit ? format_release : format_release_w_artist
|
||||
if (local_releasegroups[$1])
|
||||
line_release = format_local line_release
|
||||
switch (type) {
|
||||
case "Single": line_type=format_single; break
|
||||
case "Album": line_type=format_album; break
|
||||
|
@@ -1,5 +1,11 @@
|
||||
BEGIN { OFS="\t" }
|
||||
|
||||
BEGIN {
|
||||
OFS="\t"
|
||||
local_releases[0] = 0
|
||||
delete local_releases[0]
|
||||
while ((getline < file_local_releases) == 1)
|
||||
local_releases[$1] = 1
|
||||
close(file_local_releases)
|
||||
}
|
||||
{
|
||||
id = $1
|
||||
status = $2
|
||||
@@ -31,6 +37,8 @@ BEGIN { OFS="\t" }
|
||||
line = line "\t" release_format_title
|
||||
else
|
||||
line = line "\t"
|
||||
if (local_releases[id])
|
||||
line = format_local line
|
||||
|
||||
sub("<<status>>", line_status, line)
|
||||
sub("<<year>>", year, line)
|
||||
|
Reference in New Issue
Block a user