893382aa6262

Moar.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Mon, 03 Oct 2011 21:30:31 -0400
parents 89f24149ecd7
children 66a5e4150fb4
branches/tags (none)
files project.clj src/newseasons/loops/refresh.clj

Changes

--- a/project.clj	Mon Oct 03 21:28:10 2011 -0400
+++ b/project.clj	Mon Oct 03 21:30:31 2011 -0400
@@ -7,5 +7,6 @@
                            [cheshire "2.0.2"]
                            [clj-http "0.2.1"]
                            [aleph "0.2.0-beta2"]]
-            :main newseasons.server)
+            :main newseasons.server
+            :run-aliases {:refresh newseasons.loops.refresh/main})
 
--- a/src/newseasons/loops/refresh.clj	Mon Oct 03 21:28:10 2011 -0400
+++ b/src/newseasons/loops/refresh.clj	Mon Oct 03 21:30:31 2011 -0400
@@ -6,8 +6,8 @@
 (defn- refresh-show [id]
   (println "  refreshing" id)
   (let [show (itunes/itunes-lookup-seasons id)]
-    (println show)
-    (println "    ->" (show "artistName"))
+    (when show
+      (println "    ->" (show "artistName")))
     (Thread/sleep 5000)))
 
 (defn- refresh []
@@ -18,5 +18,5 @@
 
 (defn main [& args]
   (println "Starting Refresh Loop!")
-  (println)
+  (println "----------------------")
   (dorun (repeatedly refresh)))