extended awk scripts to return partentid
This commit is contained in:
		@@ -16,5 +16,5 @@ BEGIN {
 | 
			
		||||
    name = name " " format_disambiguation
 | 
			
		||||
  sub("<<disambiguation>>", $4, name)
 | 
			
		||||
  sub("<<name>>", $3, name)
 | 
			
		||||
  print l, name, $1
 | 
			
		||||
  print l, name, "0", $1
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -10,12 +10,13 @@ BEGIN {
 | 
			
		||||
}
 | 
			
		||||
{
 | 
			
		||||
  gsub("&", "\\\\&")
 | 
			
		||||
  id = $1
 | 
			
		||||
  med = $2
 | 
			
		||||
  nr = $3
 | 
			
		||||
  dur = $4
 | 
			
		||||
  title = $5
 | 
			
		||||
  artist = $6
 | 
			
		||||
  parentid = $1
 | 
			
		||||
  id = $2
 | 
			
		||||
  med = $3
 | 
			
		||||
  nr = $4
 | 
			
		||||
  dur = $5
 | 
			
		||||
  title = $6
 | 
			
		||||
  artist = $7
 | 
			
		||||
  # Parse duration
 | 
			
		||||
  if (dur) {
 | 
			
		||||
    dur = int(dur / 1000)
 | 
			
		||||
@@ -37,5 +38,5 @@ BEGIN {
 | 
			
		||||
  sub("<<duration>>", dur, line)
 | 
			
		||||
  l = local_recordings[id] ? format_local : ""
 | 
			
		||||
  sortk = med" "nr
 | 
			
		||||
  print sortk, l, line, id ":" local_recordings[id]
 | 
			
		||||
  print sortk, l, line, parentid, id ":" local_recordings[id]
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -58,5 +58,5 @@ BEGIN {
 | 
			
		||||
  line_year = year ? format_year : ""
 | 
			
		||||
  sub("<<year>>", year, line_year)
 | 
			
		||||
  sortk = year ? year : 0
 | 
			
		||||
  print sortk, l, line_type, line_release, line_year, line_sectype, id
 | 
			
		||||
  print sortk, l, line_type, line_release, line_year, line_sectype, "0", id
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -9,17 +9,18 @@ BEGIN {
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
{
 | 
			
		||||
  id = $1
 | 
			
		||||
  status = $2
 | 
			
		||||
  year = substr($3, 1, 4) + 0
 | 
			
		||||
  parentid = $1
 | 
			
		||||
  id = $2
 | 
			
		||||
  status = $3
 | 
			
		||||
  year = substr($4, 1, 4) + 0
 | 
			
		||||
  year = year == 0 ? "" : year
 | 
			
		||||
  covercount = $4
 | 
			
		||||
  label = $5
 | 
			
		||||
  trackcnt = $6
 | 
			
		||||
  media = $7
 | 
			
		||||
  country = $8
 | 
			
		||||
  title = $9
 | 
			
		||||
  artist = $10
 | 
			
		||||
  covercount = $5
 | 
			
		||||
  label = $6
 | 
			
		||||
  trackcnt = $7
 | 
			
		||||
  media = $8
 | 
			
		||||
  country = $9
 | 
			
		||||
  title = $10
 | 
			
		||||
  artist = $11
 | 
			
		||||
  switch (status) {
 | 
			
		||||
    case "Official": line_status = release_official; break
 | 
			
		||||
    case "Promotion": line_status = release_promotion; break
 | 
			
		||||
@@ -53,5 +54,5 @@ BEGIN {
 | 
			
		||||
  sub("<<country>>", country, line)
 | 
			
		||||
  sortk = year ? year : 0
 | 
			
		||||
  l = local_releases[id] ? format_local : ""
 | 
			
		||||
  print sortk, l, line, id ":" local_releases[id]
 | 
			
		||||
  print sortk, l, line, parentid, id ":" local_releases[id]
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user