diff --git a/xiaomusic/cli.py b/xiaomusic/cli.py index e3d163931..dca42a0ac 100644 --- a/xiaomusic/cli.py +++ b/xiaomusic/cli.py @@ -180,11 +180,12 @@ def signal_handler(sig, frame): # 捕获主进程的退出信号 signal.signal(signal.SIGINT, signal_handler) signal.signal(signal.SIGTERM, signal_handler) + port = int(config.port) if config.enable_gate: run_gate() - run_server(config.port + 1) + run_server(port + 1) else: - run_server(config.port) + run_server(port) if __name__ == "__main__": diff --git a/xiaomusic/config.py b/xiaomusic/config.py index b3a4d8383..775d90a5a 100644 --- a/xiaomusic/config.py +++ b/xiaomusic/config.py @@ -137,7 +137,7 @@ class Config: os.getenv("XIAOMUSIC_REMOVE_ID3TAG", "false").lower() == "true" ) delay_sec: int = int(os.getenv("XIAOMUSIC_DELAY_SEC", 3)) # 下一首歌延迟播放秒数 - enable_gate: bool = os.getenv("XIAOMUSIC_ENABLE_GATE", "true").lower() == "true" + enable_gate: bool = os.getenv("XIAOMUSIC_ENABLE_GATE", "false").lower() == "true" def append_keyword(self, keys, action): for key in keys.split(","): diff --git a/xiaomusic/static/setting.html b/xiaomusic/static/setting.html index 012e3fdd3..2a5d21807 100644 --- a/xiaomusic/static/setting.html +++ b/xiaomusic/static/setting.html @@ -127,6 +127,12 @@

小爱音箱设置面板 + + +