mirror of
https://github.com/heyarne/airsonic-ui.git
synced 2026-05-06 18:33:38 +02:00
* First sloppy import of code from heyarne/reagent-movable * Consistently use "current queue" to avoid confusion * Update shadow-cljs, re-frame and debux * Solve styling problem when sorting table rows * Make sortable component more reusable * Refactor playlist to use a sorted-map * Make sure current queue is displayed again * Fix sorting when converting a shuffled into a linear playlist * Implement set-current-track * Implement song-move in playlist * Add autoprefixer * Implement drag and drop reordering in current queue * Fix broken dev sass build * Bump some dependencies * Move airsonic-ui.views.icon to bulma.icon * Implement reusable dropdown in bulma.dropdown * Immediately render reordered tracks, reimplement actions in album view * Use new song-table on search result page * Make song-table more reusable * Remove current song * Implement go to source in current queue * Remove unused song view
15 lines
355 B
Clojure
15 lines
355 B
Clojure
(ns airsonic-ui.components.current-queue.subs
|
|
(:require [re-frame.core :as rf]))
|
|
|
|
(defn queue-info [playlist]
|
|
{:count (count playlist)
|
|
:duration
|
|
(reduce (fn [acc [_ item]]
|
|
(+ acc (:duration item))) 0 (:items playlist))})
|
|
|
|
(println "registering the sub")
|
|
|
|
(rf/reg-sub
|
|
:current-queue/info
|
|
:<- [:audio/current-playlist]
|
|
queue-info)
|