Browse Source

调整细节

Signed-off-by: allan716 <[email protected]>
allan716 3 years ago
parent
commit
e96d15c357
2 changed files with 8 additions and 2 deletions
  1. 1 0
      .gitignore
  2. 7 2
      cmd/chinesesubfinder/main.go

+ 1 - 0
.gitignore

@@ -71,3 +71,4 @@ TestData/
 /internal/types/backend/reply_check_proxy.json
 /internal/logic/emby_helper/Logs
 /internal/pkg/downloader/ChineseSubFinderSettings.json
+/ChineseSubFinderSettings.json

+ 7 - 2
cmd/chinesesubfinder/main.go

@@ -1,6 +1,7 @@
 package main
 
 import (
+	"fmt"
 	"github.com/allanpk716/ChineseSubFinder/internal/backend"
 	"github.com/allanpk716/ChineseSubFinder/internal/logic/cron_helper"
 	"github.com/allanpk716/ChineseSubFinder/internal/pkg/global_value"
@@ -31,15 +32,19 @@ func main() {
 
 	if settings.GetSettings().UserInfo.Username == "" || settings.GetSettings().UserInfo.Password == "" {
 		// 如果没有完成,那么就不开启
-
+		log_helper.GetLogger().Infoln("Need do Setup")
 	} else {
 		// 是否完成了 Setup,如果完成了,那么就开启第一次的扫描
 		go func() {
 			cronHelper.Start(settings.GetSettings().CommonSettings.RunScanAtStartUp)
 		}()
 	}
+
+	nowPort := readCustomPortFile()
+	log_helper.GetLogger().Infoln(fmt.Sprintf("WebUI will listen at 0.0.0.0:%d", nowPort))
+
 	// 支持在外部配置特殊的端口号,以防止本地本占用了无法使用
-	backend.StartBackEnd(readCustomPortFile(), cronHelper)
+	backend.StartBackEnd(nowPort, cronHelper)
 }
 
 func readCustomPortFile() int {