Skip to content

Commit

Permalink
Ignore key mangadex_default in config YAML and remove unnecessary
Browse files Browse the repository at this point in the history
calls to `YAML::Field`
  • Loading branch information
hkalexling committed Mar 13, 2020
1 parent ae281e2 commit 173ff2d
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/config.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 173ff2d

Please sign in to comment.