Skip to content

Commit

Permalink
fix: EhTag github url
Browse files Browse the repository at this point in the history
  • Loading branch information
Nekoer committed Oct 16, 2022
1 parent dbac0fd commit f3c958a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main/kotlin/config/EhTagTranslationConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,18 @@ public object EhTagTranslationConfig{
BrowserUserAgent()
ContentEncoding
}
var url = "https://github.com/EhTagTranslation/Database/releases/latest/download/db.text.json"
val url = "https://raw.fastgit.org/EhTagTranslation/DatabaseReleases/master/db.text.json"
val statement: HttpResponse =
http.get(url)
while (statement.isActive) {
try {
database0.writeBytes(statement.readBytes())
break
} catch (_: SocketTimeoutException) {
url = "https://raw.fastgit.org/EhTagTranslation/DatabaseReleases/master/db.text.json"
continue
} catch (_: ConnectTimeoutException) {
url = "https://raw.fastgit.org/EhTagTranslation/DatabaseReleases/master/db.text.json"
continue
} catch (_: java.net.SocketException) {
url = "https://raw.fastgit.org/EhTagTranslation/DatabaseReleases/master/db.text.json"
logger.warning("翻译词典下载失败,正在尝试重新下载")
continue
}
Expand Down

0 comments on commit f3c958a

Please sign in to comment.