summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-11-27 07:54:32 -0800
committerColin Okay <colin@cicadas.surf>2022-11-27 07:54:32 -0800
commit5efaca483832d967dab3f0a26961404cbe4c1fa2 (patch)
tree6815de5245d70a0e6fcfc5a5e7cdcece3b5e23e6
parente53a656f96612975905c0322497afee8a48ae289 (diff)
Fix: playlist duration trying to add nil track-duration to integer
This is a hotfix. A TRACK's DURATION slot should never be nil.
-rw-r--r--model.lisp2
1 files changed, 1 insertions, 1 deletions
diff --git a/model.lisp b/model.lisp
index 432eec7..ca78698 100644
--- a/model.lisp
+++ b/model.lisp
@@ -76,7 +76,7 @@
(defun playlist-duration (pl)
(reduce #'+
(playlist-tracks pl)
- :key 'track-duration
+ :key (lambda (tr) (or (track-duration tr) 0))
:initial-value 0))
(defun add-track (tr pl &optional (n -1))