更新 MusicLyrics.lua
This commit is contained in:
@@ -217,7 +217,7 @@ local function displayLyrics(url, notzh, fontType, colorsConfig)
|
|||||||
-- 获取歌词数据
|
-- 获取歌词数据
|
||||||
local response = http.get(url)
|
local response = http.get(url)
|
||||||
if not response then
|
if not response then
|
||||||
print("无法连接到服务器")
|
print("1 无法连接到服务器 URL: "..URL)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -233,7 +233,7 @@ local function displayLyrics(url, notzh, fontType, colorsConfig)
|
|||||||
-- 解析JSON数据
|
-- 解析JSON数据
|
||||||
local data = textutils.unserialiseJSON(content)
|
local data = textutils.unserialiseJSON(content)
|
||||||
if not data or not data.lrc or not data.lrc.lyric then
|
if not data or not data.lrc or not data.lrc.lyric then
|
||||||
print("无法解析歌词数据")
|
print("2 无法解析歌词数据")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user