Ignore key mangadex_default in config YAML and remove unnecessary

calls to `YAML::Field`
This commit is contained in:
Alex Ling 2020-03-13 17:45:29 +00:00
parent ae281e2e21
commit 173ff2d2e6

View File

@ -3,26 +3,17 @@ require "yaml"
class Config
include YAML::Serializable
@[YAML::Field(key: "port")]
property port : Int32 = 9000
@[YAML::Field(key: "library_path")]
property library_path : String = \
File.expand_path "~/mango/library", home: true
@[YAML::Field(key: "db_path")]
property db_path : String = \
File.expand_path "~/mango/mango.db", home: true
@[YAML::Field(key: "scan_interval_minutes")]
property scan_interval : Int32 = 5
@[YAML::Field(key: "log_level")]
property log_level : String = "info"
@[YAML::Field(key: "mangadex")]
property mangadex = Hash(String, String|Int32).new
@[YAML::Field(ignore: true)]
@mangadex_defaults = {
"base_url" => "https://mangadex.org",
"api_url" => "https://mangadex.org/api",