diff options
-rw-r--r-- | model.lisp | 6 | ||||
-rw-r--r-- | playlist.lisp | 12 |
2 files changed, 9 insertions, 9 deletions
@@ -182,6 +182,6 @@ (defun update-track-info (track new-artist new-album new-title) (with-transaction () (with-slots (artist album title) track - (setf artist new-artist - album new-album - title new-title)))) + (setf artist (if (equal "" new-artist) nil new-artist) + album (if (equal "" new-album) nil new-album) + title (if (equal "" new-title) nil new-title))))) diff --git a/playlist.lisp b/playlist.lisp index 0f2f8ac..092c224 100644 --- a/playlist.lisp +++ b/playlist.lisp @@ -234,9 +234,9 @@ (editing? track-ctl) t) (with-slots (artist-input album-input title-input) track-ctl (with-slots (artist album title) (track track-ctl) - (setf (value artist-input) (or artist "Artist") - (value album-input) (or album "Album") - (value title-input) (or title "Title")) + (setf (place-holder artist-input) (or artist "Artist") + (place-holder album-input) (or album "Album") + (place-holder title-input) (or title "Title")) (set-on-click (edit-save-btn track-ctl) (thunk* (update-track-info @@ -321,11 +321,11 @@ (div (:bind info-edit-ctl :class "track-list-edit") (div (:class "track-edit-inputs column") ;; (label (:content "Artist" :bind artist-label)) - (form-element (:text :bind artist-input)) + (form-element (:text :bind artist-input :value (track-artist track))) ;; (label (:content "Album" :bind album-label)) - (form-element (:text :bind album-input)) + (form-element (:text :bind album-input :value (track-album track))) ;; (label (:content "Title" :bind title-label)) - (form-element (:text :bind title-input)))) + (form-element (:text :bind title-input :value (track-title track))))) (div (:bind edit-controls) (button (:content "edit " :bind edit-save-btn)) (button (:content "delete " :bind delbtn)) |