diff options
-rw-r--r-- | playlist.lisp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/playlist.lisp b/playlist.lisp index c8c3bc7..0fe1ae9 100644 --- a/playlist.lisp +++ b/playlist.lisp @@ -259,12 +259,11 @@ (pathname-type (track-file track)))) (defun track-listing-line (track) - (with-slots (artist title) track - (with-output-to-string (out) - (when artist - (princ artist out) - (princ " - " out)) - (princ title out)))) + (with-slots (artist title duration) track + (format nil "~50<~a~;~a~;~a~>" + title + (if artist (concatenate 'string "by " artist) "") + (secs-to-hms (or duration 0))))) (defun create-track-list-item (list track ctl) (with-clog-create list @@ -274,9 +273,7 @@ (button (:content "↓" :bind downbtn)) (button (:content "↑" :bind upbtn))) (div (:bind item :class "track-list-item") - (span (:content (track-listing-line track))) - (span (:content " -- ")) - (span (:content (secs-to-hms (or (track-duration track) 0))))) + (section (:pre :content (track-listing-line track)))) (audio (:source (media-url-path track) :controls nil :bind audio))) (let ((track-ctl (make-instance 'track-ctl |