hook for recording play

This commit is contained in:
2025-08-24 22:46:34 +02:00
parent f93b85b55e
commit a48a92ca58
6 changed files with 45 additions and 20 deletions

View File

@@ -1,5 +1,13 @@
BEGIN { OFS="\t" }
BEGIN {
OFS="\t"
local_recordings[0] = 0
delete local_recordings[0]
if (file_local_recordings) {
while ((getline < file_local_recordings) == 1)
local_recordings[$1] = $2
close(file_local_recordings)
}
}
{
gsub("&", "\\\\&")
id = $1
@@ -27,6 +35,7 @@ BEGIN { OFS="\t" }
sub("<<title>>", title, line)
sub("<<artist>>", artist, line)
sub("<<duration>>", dur, line)
l = local_recordings[id] ? format_local : ""
sortk = med" "nr
print sortk, line, id
print sortk, l, line, id ":" local_recordings[id]
}