mirror of
https://github.com/hkalexling/Mango.git
synced 2026-04-30 00:00:43 -04:00
Implement library caching TitleInfo
* Cache sum of entry progress * Cache cover_url * Cache display_name * Cache sort_opt
This commit is contained in:
@@ -102,6 +102,8 @@ class Library
|
||||
|
||||
storage = Storage.new auto_close: false
|
||||
|
||||
InfoCache.clear
|
||||
|
||||
(Dir.entries @dir)
|
||||
.select { |fn| !fn.starts_with? "." }
|
||||
.map { |fn| File.join @dir, fn }
|
||||
@@ -115,6 +117,8 @@ class Library
|
||||
@title_ids << title.id
|
||||
end
|
||||
|
||||
InfoCache.clean
|
||||
|
||||
storage.bulk_insert_ids
|
||||
storage.close
|
||||
|
||||
|
||||
Reference in New Issue
Block a user