From: Chris Jaekl Date: Mon, 24 Jun 2024 18:55:16 +0000 (-0400) Subject: (Minor cleanup after rebase) X-Git-Url: https://jaekl.net/gitweb/?a=commitdiff_plain;h=40693ed045f413e2967ed1aca1e94534099471fd;p=quanlib.git (Minor cleanup after rebase) --- 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