Remove removed titles from title_hash

This commit is contained in:
Leeingnyo 2021-09-12 13:39:28 +09:00
parent cd48b45f11
commit 8c90b46114
2 changed files with 6 additions and 2 deletions

View File

@ -159,7 +159,9 @@ class Library
@title_ids.select! do |title_id| @title_ids.select! do |title_id|
title = @title_hash[title_id] title = @title_hash[title_id]
title.examine existence = title.examine
@title_hash.delete title_id unless existence
existence
end end
remained_title_dirs = @title_ids.map { |id| title_hash[id].dir } remained_title_dirs = @title_ids.map { |id| title_hash[id].dir }

View File

@ -95,7 +95,9 @@ class Title
previous_titles_size = @title_ids.size previous_titles_size = @title_ids.size
@title_ids.select! do |title_id| @title_ids.select! do |title_id|
title = Library.default.get_title! title_id title = Library.default.get_title! title_id
title.examine cache existence = title.examine cache
Library.default.title_hash.delete title_id unless existence
existence
end end
remained_title_dirs = @title_ids.map do |title_id| remained_title_dirs = @title_ids.map do |title_id|
title = Library.default.get_title! title_id title = Library.default.get_title! title_id