From b4b767d4c21e389803788ce5ab840d96ad1bf268 Mon Sep 17 00:00:00 2001 From: Simon Ding Date: Wed, 19 Mar 2025 13:44:45 +0800 Subject: [PATCH] chore: rename --- Dockerfile | 2 +- db/const.go | 2 +- db/db.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7183ddc..257ad87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ RUN go mod download COPY . . # 指定OS等,并go build -RUN CGO_ENABLED=0 go build -o polaris -ldflags="-X polaris/db.Version=$(git describe --tags --long) -X polaris/db.TmdbApiKey=$(echo $TMDB_API_KEY)" ./cmd/ +RUN CGO_ENABLED=0 go build -o polaris -ldflags="-X polaris/db.Version=$(git describe --tags --long) -X polaris/db.DefaultTmdbApiKey=$(echo $TMDB_API_KEY)" ./cmd/ FROM debian:stable-slim diff --git a/db/const.go b/db/const.go index e5b1db1..59b7906 100644 --- a/db/const.go +++ b/db/const.go @@ -4,7 +4,7 @@ import "polaris/ent/media" var ( Version = "undefined" - TmdbApiKey = "" + DefaultTmdbApiKey = "" ) const ( diff --git a/db/db.go b/db/db.go index ed807a0..09b601f 100644 --- a/db/db.go +++ b/db/db.go @@ -738,7 +738,7 @@ func (c *Client) SetAcceptedSubtitleFormats(key string, v []string) error { func (c *Client) GetTmdbApiKey() string { k := c.GetSetting(SettingTmdbApiKey) if k == "" { - return TmdbApiKey + return DefaultTmdbApiKey } return k } \ No newline at end of file