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

Can play a single song :)

This commit is contained in:
Arne Schlüter 2018-04-20 16:21:19 +02:00
commit 0e17354e58
4 changed files with 28 additions and 1 deletions

View file

@ -62,6 +62,16 @@
(println "api call gone bad; CORS headers missing? check for :status 0" event)
db))
;; musique
(re-frame/reg-event-fx
::play-song
(fn [{:keys [db]} [_ song]]
(let [song-url (api/url "stream" (merge {:id (:id song)}
(:login db)))]
(println "Requesting to stream song at" song-url)
{:play-song song-url})))
;; routing
(re-frame/reg-event-fx