fix: 兼容旧的setting.json文件中conf_path为空的情况
This commit is contained in:
parent
e5b32b2831
commit
fb44f88df2
@ -32,7 +32,7 @@ def update_html_version(html_files, version):
|
||||
html_content = html_file.read_text()
|
||||
|
||||
# 更新CSS和JS版本号
|
||||
html_content = pattern.sub(fr'\g<1>?version={version}"', html_content)
|
||||
html_content = pattern.sub(rf'\g<1>?version={version}"', html_content)
|
||||
# html_content = pattern.sub(fr'\g<1>"', html_content)
|
||||
|
||||
# 保存更改到HTML文件
|
||||
|
@ -87,6 +87,9 @@ class XiaoMusic:
|
||||
def init_config(self):
|
||||
self.music_path = self.config.music_path
|
||||
self.conf_path = self.config.conf_path
|
||||
# 兼容旧配置空的情况
|
||||
if not self.conf_path:
|
||||
self.conf_path = "conf"
|
||||
self.download_path = self.config.download_path
|
||||
if not self.download_path:
|
||||
self.download_path = self.music_path
|
||||
|
Loading…
Reference in New Issue
Block a user