diff --git a/update-static-version.py b/update-static-version.py index c2f9f6cee..73aaed301 100755 --- a/update-static-version.py +++ b/update-static-version.py @@ -16,13 +16,12 @@ def get_html_files(directory): def update_html_version(html_files, version): """ - 更新HTML文件中所有以 /static/ 开头的CSS和JS文件引用的版本号。 + 更新HTML文件中所有以 ./ 开头的CSS和JS文件引用的版本号。 :param html_files: 需要更新的HTML文件路径的列表。 :param version: 新的版本号字符串。 """ - pattern = re.compile(r'(/static/.*(css|js))\?version=[^"]*"') - # pattern = re.compile(r'(/static/.*html)\?version=[^"]*"') + pattern = re.compile(r'(\./.*(css|js))\?version=[^"]*"') for html_file in html_files: if not html_file.exists(): @@ -48,7 +47,7 @@ def update_html_version(html_files, version): t = str(int(time.time())) # 指定目录 - html_directory = "xiaomusic/static" # 修改为实际的HTML文件目录路径 + html_directory = "xiaomusic/static/default" # 修改为实际的HTML文件目录路径 # 获取HTML文件列表 html_files_to_update = get_html_files(html_directory) diff --git a/xiaomusic/static/default/debug.html b/xiaomusic/static/default/debug.html index a77445b5b..6e3633866 100644 --- a/xiaomusic/static/default/debug.html +++ b/xiaomusic/static/default/debug.html @@ -5,9 +5,9 @@ Debug For XiaoMusic - + - + diff --git a/xiaomusic/static/default/index.html b/xiaomusic/static/default/index.html index 682e3ecd6..482ee4252 100644 --- a/xiaomusic/static/default/index.html +++ b/xiaomusic/static/default/index.html @@ -3,9 +3,9 @@ 小爱音箱操控面板 - - - + + + diff --git a/xiaomusic/static/default/m3u.html b/xiaomusic/static/default/m3u.html index 5d288b3f4..b758cbc78 100644 --- a/xiaomusic/static/default/m3u.html +++ b/xiaomusic/static/default/m3u.html @@ -4,7 +4,7 @@ M3U to JSON Converter - + diff --git a/xiaomusic/static/default/setting.html b/xiaomusic/static/default/setting.html index 4b587b4b1..6589685e9 100644 --- a/xiaomusic/static/default/setting.html +++ b/xiaomusic/static/default/setting.html @@ -3,9 +3,9 @@ 小爱音箱操控面板 - - - + + + diff --git a/xiaomusic/static/index.html b/xiaomusic/static/index.html index e32843810..67183933b 100644 --- a/xiaomusic/static/index.html +++ b/xiaomusic/static/index.html @@ -6,6 +6,16 @@ 小爱音箱操控面板 + + + + + @@ -30,8 +40,22 @@

谁家灯火夜通明

power by XiaoMusic - \ No newline at end of file + diff --git a/xiaomusic/static/pure/index.html b/xiaomusic/static/pure/index.html index f52e6c497..af482f1ad 100644 --- a/xiaomusic/static/pure/index.html +++ b/xiaomusic/static/pure/index.html @@ -7,6 +7,16 @@ 小爱音箱操控面板 + + + + +