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