]> jaekl.net Git - quanlib.git/commitdiff
(Minor cleanup after rebase)
authorChris Jaekl <chris@localhost>
Mon, 24 Jun 2024 18:55:16 +0000 (14:55 -0400)
committerChris Jaekl <chris@localhost>
Mon, 24 Jun 2024 18:55:16 +0000 (14:55 -0400)
app/scanner/scanner.rb
app/walk_dir.rb

index bbeab1f2c296d810ec8425768d1bdabd3d11df5a..e924fe60a5cc20eb7a5924e7b63c4b328702ba02 100644 (file)
@@ -98,10 +98,10 @@ module Scanner
       book.arrived = File.ctime(filename)
       book.classification_id = @store.find_classification(book.author.grouping, File.basename(filename, ".*"))
 
-      return book unless category == NON_FIC_FOLDER && classification_id.nil?
+      return book unless category == NON_FIC_FOLDER && book.classification_id.nil?
 
-      File.open(Store.unclassified_csv, "a") do |fd|
-        fd.puts "#{grouping.inspect},#{path.inspect}"
+      File.open(@store.unclassified_csv, "a") do |fd|
+        fd.puts "#{grouping.inspect},#{filename.inspect}"
       end
 
       book
index 4b2c37e77dedf1ce8db5e26d2d15706b112a0727..d23de80f87ae7832b0d4b0dccea284c639c61719 100644 (file)
@@ -37,7 +37,8 @@ class WalkDir
     @threads = []
     num_threads.times do
       @threads << Thread.new do
-        BookLoader.new(@config_file, @queue).run
+        store = Store.new(@config_file)
+        BookLoader.new(@config_file, @queue, store).run
       end
     end