 (defn iplayer-search-resultstring
   "run external command with given args list."
   [search-title]
-  (:out (apply sh (flatten
-                   (conj (list search-title) iplayer-command)))))
+  (:out (apply sh (conj iplayer-command search-title))))
 
 (defn iplayer-search
   "If old-recording? display a list of all programmes,

(ns beebster-clj.core
  (:import [java.lang.ProcessBuilder])
  (:require [compojure.route :as route]
            [compojure.handler :as handler]
            
            ;; [beebster-clj.views :as views]
            )
  (:use [ring.adapter.jetty :only [run-jetty]]
        [clojure.java.shell :only [sh]]
        [clojure.string :as str :only [split-lines ]]



(def iplayer-command
  ["get_iplayer" "--nocopyright" "--limitmatches" "50" "--listformat" "<index> <pid> <thumbnail> <name> <episode>"])

(def iplayer-info
  ["get-iplayer" "-i"])
