           (copy-obi-project!)
           (create-obi-config-file!)))))
 
-(def recording-productions-without-obi
-  "All productions with state \"recording\" with wav files but no obi project"
-  (filter #(not (contains-obi-project (get-all-files %)))
-          recording-productions-with-wav))
-
 (defn create-recording-productions-without-obi!
   "Create all productions with state \"recording\" with wav files that
   do not contain an obi project. Add to the db and create the directories"
-  []
-  (doseq [p recording-productions-without-obi]
+  [productions]
+  (doseq [p (filter recording-with-wav-no-obi? productions)]
     (-> p
         prod/create!
         prod/set-state-structured!

    (println (str (string/capitalize state) ": ") (string/join ", " (map :id (filter #(= (:state %) state) all-productions)))))
  (println )
  (println "Importing commercial audio books")
  (println)
  (println "Ready: " (count (ready-productions all-commercial-productions)))
  (println (string/join ", " (map :id (ready-productions all-commercial-productions))))
  (println)
  (println "Archived: " (count (archived-productions all-commercial-productions)))
  (println)
)

            [clojure.java.jdbc :as jdbc]
            [environ.core :refer [env]]
            [mdr2.production :as prod]
            [mdr2.dtbook :as dtbook]
            [immutant.transactions.jdbc :refer [factory]]))

(def ^:private db {:factory factory :name "java:jboss/datasources/productions"})
