         (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))))
 
 

    (.on stream "end"
      (fn []
        (println "Download complete!")
        (swap! app-state assoc :num-of-downloads (- (:num-of-downloads @app-state) 1))
        (swap! app-state assoc :download-progress (dissoc (:download-progress @app-state) track-id))

        (if (> (:download-slots @app-state) (:num-of-downloads @app-state))

  (fn [stream track-id file-size]
    (println "Download starting!")


    (.on stream "data"
      (fn [data-chunk]
