支持配置 ffmpeg 路径 #15
This commit is contained in:
parent
17d7f54c20
commit
54b4417069
@ -88,6 +88,7 @@ class Config:
|
||||
search_prefix: str = os.getenv(
|
||||
"XIAOMUSIC_SEARCH", "ytsearch:"
|
||||
) # "bilisearch:" or "ytsearch:"
|
||||
ffmpeg_location: str = os.getenv("XIAOMUSIC_FFMPEG_LOCATION", "./ffmpeg/bin")
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
if self.proxy:
|
||||
|
@ -57,6 +57,7 @@ class XiaoMusic:
|
||||
self.port = config.port
|
||||
self.proxy = config.proxy
|
||||
self.search_prefix = config.search_prefix
|
||||
self.ffmpeg_location = config.ffmpeg_location
|
||||
|
||||
# 下载对象
|
||||
self.download_proc = None
|
||||
@ -311,7 +312,7 @@ class XiaoMusic:
|
||||
"-o",
|
||||
f"{name}.mp3",
|
||||
"--ffmpeg-location",
|
||||
"./ffmpeg/bin",
|
||||
f"{self.ffmpeg_location}",
|
||||
"--no-playlist",
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user