From 40693ed045f413e2967ed1aca1e94534099471fd Mon Sep 17 00:00:00 2001 From: Chris Jaekl Date: Mon, 24 Jun 2024 14:55:16 -0400 Subject: [PATCH] (Minor cleanup after rebase) --- app/scanner/scanner.rb | 6 +++--- app/walk_dir.rb | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/scanner/scanner.rb b/app/scanner/scanner.rb index bbeab1f..e924fe6 100644 --- a/app/scanner/scanner.rb +++ b/app/scanner/scanner.rb @@ -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 diff --git a/app/walk_dir.rb b/app/walk_dir.rb index 4b2c37e..d23de80 100644 --- a/app/walk_dir.rb +++ b/app/walk_dir.rb @@ -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 -- 2.39.2