mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-03 03:15:31 -04:00
Merge branch 'master' into dev
This commit is contained in:
commit
eed1a9717e
@ -93,7 +93,7 @@ default_username: ""
|
|||||||
auth_proxy_header_name: ""
|
auth_proxy_header_name: ""
|
||||||
mangadex:
|
mangadex:
|
||||||
base_url: https://mangadex.org
|
base_url: https://mangadex.org
|
||||||
api_url: https://mangadex.org/api/v2
|
api_url: https://api.mangadex.org/v2
|
||||||
download_wait_seconds: 5
|
download_wait_seconds: 5
|
||||||
download_retries: 4
|
download_retries: 4
|
||||||
download_queue_db_path: ~/mango/queue.db
|
download_queue_db_path: ~/mango/queue.db
|
||||||
|
@ -92,14 +92,23 @@ class Config
|
|||||||
raise "Login is disabled, but default username is not set. " \
|
raise "Login is disabled, but default username is not set. " \
|
||||||
"Please set a default username"
|
"Please set a default username"
|
||||||
end
|
end
|
||||||
unless mangadex["api_url"] =~ /\/v2/
|
|
||||||
# `Logger.default` is not available yet
|
# `Logger.default` is not available yet
|
||||||
Log.setup :debug
|
Log.setup :debug
|
||||||
|
unless mangadex["api_url"] =~ /\/v2/
|
||||||
Log.warn { "It looks like you are using the deprecated MangaDex API " \
|
Log.warn { "It looks like you are using the deprecated MangaDex API " \
|
||||||
"v1 in your config file. Please update it to " \
|
"v1 in your config file. Please update it to " \
|
||||||
"https://api.mangadex.org/v2 to suppress this warning." }
|
"https://api.mangadex.org/v2 to suppress this warning." }
|
||||||
mangadex["api_url"] = "https://api.mangadex.org/v2"
|
mangadex["api_url"] = "https://api.mangadex.org/v2"
|
||||||
end
|
end
|
||||||
|
if mangadex["api_url"] =~ /\/api\/v2/
|
||||||
|
Log.warn { "It looks like you are using the outdated MangaDex API " \
|
||||||
|
"url (mangadex.org/api/v2) in your config file. Please " \
|
||||||
|
"update it to https://api.mangadex.org/v2 to suppress this " \
|
||||||
|
"warning." }
|
||||||
|
mangadex["api_url"] = "https://api.mangadex.org/v2"
|
||||||
|
end
|
||||||
|
|
||||||
mangadex["api_url"] = mangadex["api_url"].to_s.rstrip "/"
|
mangadex["api_url"] = mangadex["api_url"].to_s.rstrip "/"
|
||||||
mangadex["base_url"] = mangadex["base_url"].to_s.rstrip "/"
|
mangadex["base_url"] = mangadex["base_url"].to_s.rstrip "/"
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user