   "Scans the directory for videos."
   [folder path]
   (let [dir (io/file (or path (:file folder)))
-        files (.listFiles dir (movie-filter))]
-    (parseq scan-threads [file (filter stable? files)]
+        files (group-by stable? (.listFiles dir (movie-filter)))]
+    (parseq scan-threads [file (get files true)]
       (log/info "adding video" (str file))
       (let [added (library/add-video folder file)]
         (when (:title added)
-          (add-metadata folder (title-for-file file)))))))
+          (add-metadata folder (title-for-file file)))))
+    (doseq [file (get files false)]
+      (add-pending-file folder file))))
 
 (defn scan-images
   "Scans the directory for images."

           (metadata? file)
           (< (.lastModified file) (- (System/currentTimeMillis) stable-time)))))

(defn add-metadata
  "Reads existing metadata for the given video."
  [folder title]

         (when (or (stable? file) (not (.exists file)))
           (dosync (alter pending-files disj [folder file])))
         (catch Exception e (log/error e "adding pending file" (str file))))))

(defn file-event
  "Processes the file system events related to files."
