 (.on socket "track-change"
   (fn [track-id]
     (swap! app-state assoc :current-track-id track-id)
-    (.emit socket "file-download-request" track-id)))
+    (if (nil? (get (:music-files @app-state) track-id))
+      (.emit socket "file-download-request" track-id)
+      (.emit socket "ready-to-start"))))
 
 (.on socket "pause"
   (fn [position]

(.on (new js/ss socket) "file-download"
  (fn [stream track-id file-size]
    (println "Download starting!")
    (.on stream "data"
      (fn [data-chunk]
        (let [size (+ (.-length data-chunk) (:data-downloaded @app-state))]

                          :music-files {}
                          :data-downloaded 0
                          :download-progress nil
                          :is-file-downloading? false
                          :current-track-id nil
                          :current-sound nil
                          :ball-being-dragged? false}))
