#17222: luci-app-minidlna can't display Minidlna Status
------------------------+-------------------------------------
Reporter: axxixihaha | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Barrier Breaker (trunk)
Component: luci | Version: Trunk
Keywords: |
------------------------+-------------------------------------
after minidlna updated to 1.1.3, minidlna status always displayed as:
"The miniDLNA service is active, serving 0 audio, 0 video and 0 image
files."
{{{
diff --git a/applications/luci-minidlna/luasrc/controller/minidlna.lua
b/applications/luci-minidlna/luasrc/controller/minid
index 500c90a..486cd9e 100644
--- a/applications/luci-minidlna/luasrc/controller/minidlna.lua
+++ b/applications/luci-minidlna/luasrc/controller/minidlna.lua
@@ -44,9 +44,9 @@ function minidlna_status()
if fd then
local html = fd:read("*a")
if html then
- status.audio = (tonumber(html:match("Audio
files: (%d+)")) or 0)
- status.video = (tonumber(html:match("Video
files: (%d+)")) or 0)
- status.image = (tonumber(html:match("Image
files: (%d+)")) or 0)
+ status.audio =
(tonumber(html:match("<td>Audio files</td><td>(%d+)</td>")) or 0)
+ status.video =
(tonumber(html:match("<td>Video files</td><td>(%d+)</td>")) or 0)
+ status.image =
(tonumber(html:match("<td>Image files</td><td>(%d+)</td>")) or 0)
end
fd:close()
end
(END)
}}}
--
Ticket URL: <https://dev.openwrt.org/ticket/17222>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets