From 0d75ebb47601d5ffb1061fbab895c4747c06f7ac Mon Sep 17 00:00:00 2001 From: Grant Shoshin Shangreaux Date: Fri, 20 Jan 2023 17:24:19 -0600 Subject: 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 --- model.lisp | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.3