From dc1559c68064128d470e86a503b492feeafaa39f Mon Sep 17 00:00:00 2001 From: Harold Date: Sun, 19 Jan 2025 13:33:23 +0800 Subject: [PATCH] =?UTF-8?q?DOCKER=5FADDRESS=E8=87=AA=E5=8A=A8=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=20(#560)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/har01d/alist_tvbox/service/SubscriptionService.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/cn/har01d/alist_tvbox/service/SubscriptionService.java b/src/main/java/cn/har01d/alist_tvbox/service/SubscriptionService.java index 718aaeae8..1012a8a42 100644 --- a/src/main/java/cn/har01d/alist_tvbox/service/SubscriptionService.java +++ b/src/main/java/cn/har01d/alist_tvbox/service/SubscriptionService.java @@ -290,6 +290,10 @@ public String node(String file) throws IOException { String quarkCookie = panAccountRepository.findByTypeAndMasterTrue(DriverType.QUARK).map(PanAccount::getCookie).orElse(""); json = json.replace("QUARK_COOKIE", quarkCookie); + String address = readHostAddress(); + json = json.replace("DOCKER_ADDRESS", address); + json = json.replace("ATV_ADDRESS", address); + if ("index.config.js".equals(file)) { return json; } else if ("index.config.js.md5".equals(file)) { @@ -411,6 +415,9 @@ private String replaceOpen(String json) { json = json.replace("阿里token", ali); String token = siteRepository.findById(1).map(Site::getToken).orElse(""); json = json.replace("ALIST_TOKEN", token); + String address = readHostAddress(); + json = json.replace("DOCKER_ADDRESS", address); + json = json.replace("ATV_ADDRESS", address); return json; }