 (def app-state
   (atom
     {:search {
-              :term {}
+              :term #{}
               :results []
               }
      :player-queue []

                                 })
                 )))))

(defn search-view [search owner]
  (reify
    om/IWillMount
    (will-mount [_]
      (let [channel (om/get-shared owner :search-channel)]
        (go (loop []
              (let [search-for (merge (:term @search) (<! channel))
                    _ (om/update! search [:term] search-for)
                    tracks (<! (xhr-search search-for))
                    sorted (sorted-tracks tracks)]

  (:import [goog.net XhrIo])
  (:require [goog.events :as events]
            [clojure.string :as string]
            [clojure.set :as set]
            [cljs.core.async :as async :refer [>! <! put! chan]]
            [om.core :as om :include-macros true]
            [om.dom :as dom :include-macros true]
