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

More improvements to the audio player

* Expose shuffle / repeat in interface
* Make sure next song gets properly called when a song has ended
This commit is contained in:
Arne Schlüter 2018-08-20 18:29:09 +02:00
commit f7042e9ecc
6 changed files with 93 additions and 55 deletions

View file

@ -136,3 +136,8 @@
(testing "Should automatically remove a message after a while"
(let [fx (events/show-notification {} [:_ :info "This is a notification"])]
(is (= :notification/hide (-> (:dispatch-later fx) first :dispatch first))))))
(deftest song-has-ended
(testing "Should play the next song when current song has ended"
(is (not (dispatches? (events/audio-update {} [:audio/update {:ended? false}]) ::events/next-song))))
(is (dispatches? (events/audio-update {} [:audio/update {:ended? true}]) ::events/next-song)))