更新 music168.lua

This commit is contained in:
2025-11-16 19:26:36 +08:00
parent cbfbda649b
commit 3c9ec9dc18

View File

@@ -2,9 +2,9 @@
--*获取程序所在目录
local mypath = "/"..fs.getDir(shell.getRunningProgram())
if not fs.exists(mypath.."/lib/basalt.lua") then shell.run("wget https://git.liulikeji.cn/GitHub/Basalt/releases/download/v1.6.6/basalt.lua lib/basalt.lua") end
if not fs.exists(mypath.."/speakerlib.lua") then shell.run("wget https://git.liulikeji.cn/xingluo/ComputerCraft-Music168-Player/raw/branch/main/speakerlib.lua") end
if not fs.exists(mypath.."/MusicLyrics.lua") then shell.run("wget https://git.liulikeji.cn/xingluo/ComputerCraft-Music168-Player/raw/branch/main/MusicLyrics.lua") end
if not fs.exists(mypath.."/lib/basalt.lua") then shell.run("wget https://git.liulikeji.cn/GitHub/Basalt/releases/download/v1.6.6/basalt.lua "..mypath.."/lib/basalt.lua") end
if not fs.exists(mypath.."/speakerlib.lua") then shell.run("wget https://git.liulikeji.cn/xingluo/ComputerCraft-Music168-Player/raw/branch/main/speakerlib.lua"..mypath.."/speakerlib.lua") end
if not fs.exists(mypath.."/MusicLyrics.lua") then shell.run("wget https://git.liulikeji.cn/xingluo/ComputerCraft-Music168-Player/raw/branch/main/MusicLyrics.lua"..mypath.."/MusicLyrics.lua") end
--*GUI库导入
basalt = require(mypath.."/lib/basalt")
@@ -329,7 +329,7 @@ function speakerp()
play_Gui[4]:stop()
play_Gui[4]:execute(function ()
shell.run(mypath.."/MusicLyrics.lua http://music168.liulikeji.cn:15843/api/song/lyric?id=".._G.music168_music_id.." "..px)
shell.run(mypath.."MusicLyrics.lua http://music168.liulikeji.cn:15843/api/song/lyric?id=".._G.music168_music_id.." "..px)
end)
play_Gui[4]:injectEvent("char","w")
sleep(0.1)