.key file/a,cmd/a,desc
.def desc=t:file_id.diz
.bra {
.ket }
if {cmd} eq "read"
 set titel "%It%t%N%IE"
 set artist "%IaComposed by %a%N%IE"
 set album "%IlFrom the album '%l'%N%IE"
 set year "%Iy(%y)%N%IE"
 set comment "%Ic%c%IE"
 mp3info -f "$titel$artist$album$year$comment" "{file}" >"{desc}"
endif
if {cmd} eq "execute"
 set titel ""
 set titel `mp3info -f "%t" "{file}"`
 set artist ""
 set artist "`mp3info -f "%a" "{file}"`"
 set comment ""
 set comment `mp3info -f "%c" "{file}"`
 mp3info -W -s 0 "{file}" >NIL:

 unset str
 set str `requeststring "ViewDiz MPEG-3 Editor" "Enter titel:" STRING="$titel"`
 mp3info -w -t "$str" "{file}" >NIL:

 unset str
 set str `requeststring "ViewDiz MPEG-3 Editor" "Enter artist:" STRING="$artist"`
 mp3info -w -a "$str" "{file}" >NIL:

 unset str
 set str `requeststring "ViewDiz MPEG-3 Editor" "Enter comment:" STRING="$comment"`
 mp3info -w -c "$str" "{file}" >NIL:
endif

if {cmd} eq "info"
 setenv viewdiz/.minf "*"{file}*"" rx 1 _Edit (#?.mp3|#?.mpeg3) "MPEG-3 Audio"
endif
;$VER: ViewDIZ-mp3.module 1.1 (5.9.98) Mikael Lund
