-
This commit is contained in:
18
gui.rkt
18
gui.rkt
@@ -6,6 +6,8 @@
|
||||
"utils.rkt"
|
||||
"music-library.rkt"
|
||||
"translate.rkt"
|
||||
"playlist.rkt"
|
||||
"player.rkt"
|
||||
)
|
||||
|
||||
(provide
|
||||
@@ -35,9 +37,12 @@
|
||||
|
||||
(define el-seeker #f)
|
||||
(define el-library #f)
|
||||
(define el-playlist #f)
|
||||
|
||||
(define music-library (send settings get 'music-library (find-system-path 'home-dir)))
|
||||
(define current-music-path #f)
|
||||
(define playlist #f)
|
||||
(define player (new player%))
|
||||
|
||||
(define inner-html-handlers (make-hash))
|
||||
|
||||
@@ -64,6 +69,11 @@
|
||||
(send this update-library)
|
||||
)
|
||||
|
||||
|
||||
(define/public (update-playlist)
|
||||
(displayln "Updating playlist")
|
||||
)
|
||||
|
||||
(define/public (update-library)
|
||||
(when (eq? current-music-path #f)
|
||||
(set! current-music-path music-library))
|
||||
@@ -151,7 +161,13 @@
|
||||
)
|
||||
|
||||
(define/public (play-path path)
|
||||
(displayln (format "Playing ~a" path)))
|
||||
(displayln (format "Playing ~a" path))
|
||||
(set! playlist (new playlist% [start-map path]))
|
||||
(send playlist read-tracks)
|
||||
(displayln (format "number of tracks: ~a" (send playlist length)))
|
||||
(send this update-playlist)
|
||||
(send player play playlist)
|
||||
)
|
||||
|
||||
(define/public (open-booklet path)
|
||||
(displayln (format "Open booklet ~a" path)))
|
||||
|
||||
Reference in New Issue
Block a user