mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 19:05:32 -04:00
Rescan only if instance loaded
This commit is contained in:
parent
80e13abc4a
commit
e6214ddc5d
@ -29,16 +29,19 @@ class Library
|
||||
zip_file.close
|
||||
return
|
||||
end
|
||||
is_loaded = false
|
||||
begin
|
||||
instance_file.open do |content|
|
||||
@@default = Library.from_yaml content
|
||||
end
|
||||
is_loaded = true
|
||||
rescue e
|
||||
Logger.error e
|
||||
end
|
||||
|
||||
zip_file.close
|
||||
|
||||
if is_loaded
|
||||
spawn do
|
||||
start = Time.local
|
||||
Library.default.scan
|
||||
@ -47,6 +50,7 @@ class Library
|
||||
in #{ms}ms"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def initialize
|
||||
register_mime_types
|
||||
|
Loading…
x
Reference in New Issue
Block a user