Compare commits

3 Commits

Author SHA1 Message Date
c0f275cc9d 更新 music168.lua 2025-11-12 16:06:05 +08:00
HKXluo
ca4e086a66 Merge branch 'main' of https://git.liulikeji.cn/xingluo/ComputerCraft-Music168-Player 2025-11-12 15:43:43 +08:00
HKXluo
91f9048755 更新speakerlib的路径 2025-11-12 15:43:29 +08:00
2 changed files with 375 additions and 373 deletions

View File

@@ -3,7 +3,8 @@
local mypath = "/"..fs.getDir(shell.getRunningProgram()) 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.3/basalt.lua lib/basalt.lua") end if not fs.exists(mypath.."/lib/basalt.lua") then shell.run("wget https://git.liulikeji.cn/GitHub/Basalt/releases/download/v1.6.3/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/releases/download/v1.1.0/speakerlib.lua") end if not fs.exists(mypath.."/speakerlib.lua") then shell.run("wget https://git.liulikeji.cn/xingluo/ComputerCraft-Music168-Player/raw/branch/1.1.0/speakerlib.lua") end
if not fs.exists(mypath.."/MusicLyrics.lua") then shell.run("wget https://git.liulikeji.cn/xingluo/ComputerCraft-Music168-Player/raw/branch/1.1.0/MusicLyrics.lua") end
--*GUI库导入 --*GUI库导入
basalt = require(mypath.."/lib/basalt") basalt = require(mypath.."/lib/basalt")

View File

@@ -12,6 +12,7 @@ _G.Playprint = false -- 信息输出开关true开false关
_G.setVolume = 1 -- 音量控制0-3 _G.setVolume = 1 -- 音量控制0-3
local API_URL = "http://newgmapi.liulikeji.cn/api/ffmpeg" local API_URL = "http://newgmapi.liulikeji.cn/api/ffmpeg"
local mypath = "/"..fs.getDir(shell.getRunningProgram())
-- 扬声器配置 -- 扬声器配置
local speakerlist = { local speakerlist = {
@@ -27,7 +28,7 @@ local function printlog(...)
end end
local function loadSpeakerConfig() local function loadSpeakerConfig()
local speaker_groups = fs.open("speaker_groups.cfg","r") local speaker_groups = fs.open(mypath.."/speaker_groups.cfg","r")
if speaker_groups then if speaker_groups then
local content = speaker_groups.readAll() local content = speaker_groups.readAll()
speaker_groups.close() speaker_groups.close()