mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 02:45:29 -04:00
Simplify Title.new
This commit is contained in:
parent
2c241a96bb
commit
44a6f822cd
@ -19,7 +19,7 @@ class Title
|
||||
@[YAML::Field(ignore: true)]
|
||||
@cached_cover_url : String?
|
||||
|
||||
def initialize(@dir : String, @parent_id, cache : Hash(String, String)?)
|
||||
def initialize(@dir : String, @parent_id, cache : Hash(String, String)? = nil)
|
||||
storage = Storage.default
|
||||
@signature = Dir.signature dir
|
||||
id = storage.get_title_id dir, signature
|
||||
@ -70,10 +70,6 @@ class Title
|
||||
end
|
||||
end
|
||||
|
||||
def self.new(dir : String, parent_id)
|
||||
new dir, parent_id, nil
|
||||
end
|
||||
|
||||
def examine(context : ExamineContext) : Bool
|
||||
return false unless Dir.exists? @dir # No title, Remove this
|
||||
contents_signature = Dir.contents_signature @dir,
|
||||
|
Loading…
x
Reference in New Issue
Block a user