Changeset 1776


Ignore:
Timestamp:
Sep 16, 2010, 9:08:03 AM (8 years ago)
Author:
matthijs
Message:

luci-music: Give an error message when audio is not running.

Previously, luci show the user a backtrace with no indication as to what
was wrong. Now it shows a proper message (though this should not
normally happen, but just in case).

Closes: #637

Location:
trunk/luci/applications/luci-music/luasrc
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/luci/applications/luci-music/luasrc/controller/music.lua

    r1134 r1776  
    232232        local csocket = require "nixio".connect("127.0.0.1", 15052)
    233233
     234        -- If we can't connect to audiod, it's probably not running.
     235        -- Tell the user instead of throwing a traceback at them.
     236        if not csocket then
     237                 tpl.render("music/notrunning")
     238                 return
     239        end
     240
    234241        -- M3U-Play request?
    235242        local m3u = http.formvalue("m3u")
Note: See TracChangeset for help on using the changeset viewer.