File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -93,14 +93,23 @@ class Config
93
93
raise " Login is disabled, but default username is not set. " \
94
94
" Please set a default username"
95
95
end
96
+
97
+ # `Logger.default` is not available yet
98
+ Log .setup :debug
96
99
unless mangadex[" api_url" ] =~ /\/ v2/
97
- # `Logger.default` is not available yet
98
- Log .setup :debug
99
100
Log .warn { " It looks like you are using the deprecated MangaDex API " \
100
101
" v1 in your config file. Please update it to " \
101
102
" https://api.mangadex.org/v2 to suppress this warning." }
102
103
mangadex[" api_url" ] = " https://api.mangadex.org/v2"
103
104
end
105
+ if mangadex[" api_url" ] =~ /\/ api\/ v2/
106
+ Log .warn { " It looks like you are using the outdated MangaDex API " \
107
+ " url (mangadex.org/api/v2) in your config file. Please " \
108
+ " update it to https://api.mangadex.org/v2 to suppress this " \
109
+ " warning." }
110
+ mangadex[" api_url" ] = " https://api.mangadex.org/v2"
111
+ end
112
+
104
113
mangadex[" api_url" ] = mangadex[" api_url" ].to_s.rstrip " /"
105
114
mangadex[" base_url" ] = mangadex[" base_url" ].to_s.rstrip " /"
106
115
end
You can’t perform that action at this time.
0 commit comments