1
0
Fork 0
mirror of https://github.com/heyarne/airsonic-ui.git synced 2026-05-07 02:33:39 +02:00

Start restructuring audio playback, add some tests for audio

Fixes #15 where audio was not stopped on logout
This commit is contained in:
Arne Schlüter 2018-08-01 18:36:47 +02:00
commit 80225d46b1
10 changed files with 187 additions and 69 deletions

View file

@ -47,21 +47,6 @@
(fn [db _]
(:response db)))
(re-frame/reg-sub
; returns info on the current song as is (basically the metadata you can read from the file system)
::currently-playing
(fn [db _]
(:currently-playing db)))
(re-frame/reg-sub
::is-playing?
(fn [query-v _]
[(re-frame/subscribe [::currently-playing])])
(fn [[currently-playing] _]
(let [status (:status currently-playing)]
(and (not (:paused? status))
(not (:ended? status))))))
;; user notifications
(defn notifications [db _] (:notifications db))