replay_title = "IPTV"
cq:wrap(function()
while true do
- local headers, stream = assert(http_request.new_from_uri(futatabi_server .. "/queue_status"):go())
- if headers:get(":status") == "200" then
+ local headers, stream = http_request.new_from_uri(futatabi_server .. "/queue_status"):go()
+ if headers == nil then
+ replay_title = "IPTV"
+ print(futatabi_server .. ": Could not connect to get queue_status")
+ elseif headers:get(":status") == "200" then
local body = stream:get_body_as_string()
if body then
replay_title = "IPTV (" .. body .. ")"