From 935c9b3b5211d04740b1d40d7a0026d2c131d327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=84min=20Baumeler?= Date: Thu, 31 Jul 2025 20:29:30 +0200 Subject: [PATCH] artist select, ctrl-h ctrl-l keys, bugfixes --- src/awk/artists.awk | 2 +- src/awk/releases.awk | 13 ++++++++-- src/main.sh | 59 ++++++++++++++++++++++++++++++++++++++------ src/sh/api.sh | 4 +-- src/sh/theme.sh | 4 +-- 5 files changed, 67 insertions(+), 15 deletions(-) diff --git a/src/awk/artists.awk b/src/awk/artists.awk index 3097d37..e32866d 100644 --- a/src/awk/artists.awk +++ b/src/awk/artists.awk @@ -7,5 +7,5 @@ $2 != "Group" { name = format_person } name = name " " format_disambiguation sub("<>", $4, name) sub("<>", $3, name) - print $1, name + print name, $1 } diff --git a/src/awk/releases.awk b/src/awk/releases.awk index b61fcee..b0c7d78 100644 --- a/src/awk/releases.awk +++ b/src/awk/releases.awk @@ -1,8 +1,8 @@ BEGIN { OFS="\t" } { - gsub("&", "\\\\&") id = $1 + print ">>"id"<<" >> "/tmp/foo" status = $2 year = substr($3, 1, 4) + 0 year = year == 0 ? "" : year @@ -28,15 +28,24 @@ BEGIN { OFS="\t" } line = line "\t" release_format_title_artist else if (artist != rg_artist && title == rg_title) line = line "\t" release_format_artist - else if (artist != rg_artist && title == rg_title) + else if (artist == rg_artist && title != rg_title) line = line "\t" release_format_title + else + line = line "\t" + if (artist != rg_artist) + print "artist not rg_artist: "artist"!="rg_artist >> "/tmp/foo" + if (title != rg_title) + print "title not rg_title: "title"!="rg_title >> "/tmp/foo" sub("<>", line_status, line) sub("<>", year, line) sub("<>", trackcnt, line) sub("<>", media, line) + gsub("&", "\\\\&", label) sub("<