         (player/destroy-track last-current-sound-id)))
 
       (if (nil? (get (:music-files @app-state) track-id))
-        (.emit socket "file-download-request" track-id)
+        (request-file-download track-id)
         (.emit socket "ready-to-start" sound-id))))
 
 

    (swap! app-state assoc :current-track-id current-track-id)
    (swap! app-state assoc :current-sound-id current-sound-id)

    (.emit socket "file-download-request" current-track-id)))

(.on socket "set-loop"
  (fn [looping?]

          (swap! app-state assoc :download-progress (merge (:download-progress @app-state)
                                                           {track-id {:data-downloaded data-downloaded
                                                                      :file-size file-size}})))

        (swap! app-state assoc :music-files
          (merge (:music-files @app-state)
                 {track-id
