mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-03 03:15:31 -04:00
Lint
This commit is contained in:
parent
f4d7128b59
commit
a3b2cdd372
@ -153,7 +153,8 @@ class Library
|
||||
title = @title_hash[title_id]
|
||||
existence = title.examine examine_context
|
||||
unless existence
|
||||
examine_context["deleted_title_ids"].concat [title_id] + title.deep_titles.map &.id
|
||||
examine_context["deleted_title_ids"].concat [title_id] +
|
||||
title.deep_titles.map &.id
|
||||
examine_context["deleted_entry_ids"].concat title.deep_entries.map &.id
|
||||
end
|
||||
existence
|
||||
|
@ -102,7 +102,8 @@ class Title
|
||||
title = Library.default.get_title! title_id
|
||||
existence = title.examine context
|
||||
unless existence
|
||||
context["deleted_title_ids"].concat [title_id] + title.deep_titles.map &.id
|
||||
context["deleted_title_ids"].concat [title_id] +
|
||||
title.deep_titles.map &.id
|
||||
context["deleted_entry_ids"].concat title.deep_entries.map &.id
|
||||
end
|
||||
existence
|
||||
|
@ -467,13 +467,14 @@ class Storage
|
||||
end
|
||||
|
||||
# Limit mark targets with given arguments
|
||||
def mark_unavailable(trash_ids_candidates : Array(String), trash_titles_candidates : Array(String))
|
||||
def mark_unavailable(ids_candidates : Array(String),
|
||||
titles_candidates : Array(String))
|
||||
MainFiber.run do
|
||||
get_db do |db|
|
||||
# Detect dangling entry IDs
|
||||
trash_ids = [] of String
|
||||
db.query "select path, id from ids where id in " \
|
||||
"(#{trash_ids_candidates.join "," { |i| "'#{i}'" }})" do |rs|
|
||||
"(#{ids_candidates.join "," { |i| "'#{i}'" }})" do |rs|
|
||||
rs.each do
|
||||
path = rs.read String
|
||||
fullpath = Path.new(path).expand(Config.current.library_path).to_s
|
||||
@ -490,7 +491,7 @@ class Storage
|
||||
# Detect dangling title IDs
|
||||
trash_titles = [] of String
|
||||
db.query "select path, id from titles where id in " \
|
||||
"(#{trash_titles_candidates.join "," { |i| "'#{i}'" }})" do |rs|
|
||||
"(#{titles_candidates.join "," { |i| "'#{i}'" }})" do |rs|
|
||||
rs.each do
|
||||
path = rs.read String
|
||||
fullpath = Path.new(path).expand(Config.current.library_path).to_s
|
||||
|
Loading…
x
Reference in New Issue
Block a user