From 173ff2d2e679c5156c83ef4a8f16fa765af60f5f Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Fri, 13 Mar 2020 17:45:29 +0000 Subject: [PATCH] Ignore key `mangadex_default` in config YAML and remove unnecessary calls to `YAML::Field` --- src/config.cr | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/config.cr b/src/config.cr index 9555a2b..b9257d2 100644 --- a/src/config.cr +++ b/src/config.cr @@ -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",