summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Shoshin Shangreaux <shoshin@cicadas.surf>2023-01-20 17:24:19 -0600
committerGrant Shoshin Shangreaux <shoshin@cicadas.surf>2023-01-20 17:24:42 -0600
commit0d75ebb47601d5ffb1061fbab895c4747c06f7ac (patch)
tree67df451153837069c2b79033ba2ac96b97b82048
parent5f4ab44a66d6bd4c0403a2c864a1a38e570ee55e (diff)
Fix: overwrite track-file accessor to use config static dir
ideally we go back and fix the data so that the `file` slot on a track object holds the NUID.CODEC filename, rather than the path to the track on the filesystem it was downloaded on. the filesystem path can then be constructed by merging it with the media directory's path
-rw-r--r--model.lisp5
1 files changed, 5 insertions, 0 deletions
diff --git a/model.lisp b/model.lisp
index 5a06fe2..de1ea10 100644
--- a/model.lisp
+++ b/model.lisp
@@ -38,6 +38,11 @@
((source file title artist album thumb-url duration codec :with)
(playlists :with :std (list) :doc "A list of playlists in which this track appears")))
+(defun track-file (track)
+ (with-slots (file) track
+ (merge-pathnames
+ (path:basename file)
+ (merge-pathnames "media/" (static-directory *config*)))))
;;; MODEL OPERATIONS