命令行支持 ffmpeg 路径参数 #15

This commit is contained in:
涵曦 2024-02-24 13:05:36 +08:00
parent 7a32917b63
commit 08a22ca03f
2 changed files with 7 additions and 0 deletions

View File

@ -53,6 +53,11 @@ def main():
dest="config", dest="config",
help="config file path", help="config file path",
) )
parser.add_argument(
"--ffmpeg_location",
dest="ffmpeg_location",
help="ffmpeg bin path",
)
options = parser.parse_args() options = parser.parse_args()
config = Config.from_options(options) config = Config.from_options(options)

View File

@ -82,6 +82,8 @@ class XiaoMusic:
# 启动时重新生成一次播放列表 # 启动时重新生成一次播放列表
self.gen_all_music_list() self.gen_all_music_list()
self.log.debug("ffmpeg_location: %s", self.ffmpeg_location)
async def poll_latest_ask(self): async def poll_latest_ask(self):
async with ClientSession() as session: async with ClientSession() as session:
session._cookie_jar = self.cookie_jar session._cookie_jar = self.cookie_jar