               (spit 
                (str
                 "resources/video_ids/"
-                (config/all :daemon-name)
+                ((config/get-by-name daemon-name) :daemon-name)
                 "/"
                 "urls"
                 index


(defn playlist-id->video-ids [playlist-id]

  
   (while (not (= :no-more-pages (get @next-page-token playlist-id))) 
     (swap! vids (partial apply conj) (playlist-id->single-page-video-ids playlist-id))
     (Thread/sleep 15)))

(defn get-channel-uploads-playlist-id [id]
  (-> @(http/get "https://www.googleapis.com/youtube/v3/channels"
              {:query-params {:part "contentDetails"
                              :id id 
                              :key youtube-key}})
      response->clj
      (get-in ["items" 0 "contentDetails" "relatedPlaylists" "uploads"])))

(defn get-user-uploads-playlist-id [username]
  (-> @(http/get "https://www.googleapis.com/youtube/v3/channels"
              {:query-params {:part "contentDetails"
                              :forUsername username
                              :key youtube-key}})
      response->clj
      (get-in ["items" 0 "contentDetails" "relatedPlaylists" "uploads"])))



(def playlist-id (get-channel-uploads-playlist-id (config/all :youtube-channel)))

(defn get-all-uploads [] (playlist-id->video-ids playlist-id))



(defn spit-id-urls [ids]
  ;;Write out urls
  (let [url-root (str "resources/video_ids/" (config/all :daemon-name) "/")]
   (clojure.java.io/make-parents
    (str url-root "urls"))
   (->> (into [] ids)

      tmp-data)))


(defn gen-captions-to-delete [daemon-name]
  (let [file (->>
              (config/all :srt-source-folders)
              get-all-subtitle-file-objs
