 (ns smgui.engine
   (:require-macros [cljs.core.async.macros :refer [go-loop]])
-  (:require [cljs.core.async :refer [chan close! put!]]))
+  (:require [cljs.core.async :refer [chan close! put!]]
+            [smgui.track :as track]))
 
 (def subtitle-master (.require js/window "subtitle-master"))
 (def sm-search (.-SearchDownload subtitle-master))

        promise (.run op)
        c (chan)]
    (.then promise
           #(put-and-close! c [% nil])
           #(put-and-close! c ["error" %])
           #(put! c (array-seq %)))
    c))


        promise (.run op)
        c (chan)]
    (.then promise
           #(do
             (put-and-close! c [:ok (->> %
                                         array-seq
                                         (map read-alternative))])
             (track/search "alternatives"))
           #(put-and-close! c [:error %]))
    c))

