ref: f47f1ddc63b903e05df5893d2b43c5f80830596d
parent: d5721fe394af8f5fd17c07946b237ee12b69faf7
author: qwx <qwx@sciops.net>
date: Thu Feb 22 18:04:57 EST 2024
zuke: sync to front
--- a/sys/src/cmd/audio/zuke/zuke.c
+++ b/sys/src/cmd/audio/zuke/zuke.c
@@ -235,10 +235,10 @@
static char tmp[32];
char *s;
- s = nil;
switch(c){
case Palbum: s = m->album; break;
case Partist: s = m->artist[0]; break;
+ case Pcomposer: s = m->composer; break;
case Pdate: s = m->date; break;
case Ptitle: s = (!colspath && (m->title == nil || *m->title == 0)) ? m->basename : m->title; break;
case Ptrack: snprint(tmp, sizeof(tmp), "%4s", m->track); s = m->track ? tmp : nil; break;
@@ -976,6 +976,8 @@
if(m->path != nil){
if(m->filefmt == nil)
m->filefmt = "";
+ if(m->numartist == 0 && m->composer != nil)
+ m->artist[m->numartist++] = m->composer;
pl->n++;
m++;
}
@@ -995,13 +997,14 @@
if(m->numartist < Maxartist)
m->artist[m->numartist++] = s;
break;
- case Pfilefmt: m->filefmt = s; break;
- case Palbum: m->album = s; break;
- case Pdate: m->date = s; break;
- case Ptitle: m->title = s; break;
- case Ptrack: m->track = s; break;
- case Prgtrack: m->rgtrack = atof(s); break;
- case Prgalbum: m->rgalbum = atof(s); break;
+ case Pcomposer: m->composer = s; break;
+ case Pfilefmt: m->filefmt = s; break;
+ case Palbum: m->album = s; break;
+ case Pdate: m->date = s; break;
+ case Ptitle: m->title = s; break;
+ case Ptrack: m->track = s; break;
+ case Prgtrack: m->rgtrack = atof(s); break;
+ case Prgalbum: m->rgalbum = atof(s); break;
case Ppath:
m->path = s;
m->basename = (b = utfrrune(s, '/')) == nil ? s : b+1;