New file getter implemented. Windows is stubborn.

This commit is contained in:
2026-04-11 23:11:24 +02:00
parent fb99e97577
commit 2f0b91a6c6
4 changed files with 34 additions and 21 deletions

12
gui.rkt
View File

@@ -46,7 +46,13 @@
(define el-at #f)
(define el-length #f)
(define music-library (send settings get 'music-library (find-system-path 'home-dir)))
(define music-library
(let ((path (format "~a" (send settings get 'music-library (find-system-path 'home-dir)))))
(when (eq? (system-type 'os) 'windows)
(set! path (string-replace path "/" "\\")))
(dbg-rktplayer "music-library: ~a" path)
path))
(define current-music-path #f)
(define playlist #f)
@@ -116,7 +122,9 @@
(unless (eq? stored-file #f)
(dbg-rktplayer "Setting album art")
(let ((el (send this element 'album-art)))
(let ((html (format "<img src=\"~a?~a\" />" stored-file (current-milliseconds))))
(let ((html (format "<img src=\"/get-image?~a&~a\" />"
(string-replace (format "~a" stored-file) "\\" "/")
(current-milliseconds))))
(dbg-rktplayer "Html = ~a" html)
(send el set-innerHTML! html))))
)