]> git.sesse.net Git - ultimatescore/commitdiff
Fix some flickering in the IPTV title.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 28 Oct 2018 15:55:08 +0000 (16:55 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 28 Oct 2018 15:55:08 +0000 (16:55 +0100)
nageru/ultimate.lua

index 8b2b7f1b42e27f33432ec2307e7284c390b3da4f..49b52fa1664209bc805baa9e171cdf231de63fc3 100644 (file)
@@ -44,12 +44,17 @@ replay_title = "IPTV"
 cq:wrap(function()
        while true do
                local headers, stream = assert(http_request.new_from_uri(futatabi_server .. "/queue_status"):go())
-               replay_title = "IPTV"
-               if headers:get ":status" == "200" then
-                       local body = assert(stream:get_body_as_string())
+               if headers:get(":status") == "200" then
+                       local body = stream:get_body_as_string()
                        if body then
                                replay_title = "IPTV (" .. body .. ")"
+                       else
+                               replay_title = "IPTV"
+                               print(futatabi_server .. ": Empty body on HTTP request")
                        end
+               else
+                       replay_title = "IPTV"
+                       print(futatabi_server .. ": HTTP error " .. headers:get(":status"))
                end
        end
 end)