luci-minidlna: fix status display
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 26 Oct 2014 14:36:09 +0000 (15:36 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 26 Oct 2014 14:36:09 +0000 (15:36 +0100)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
applications/luci-minidlna/luasrc/controller/minidlna.lua

index 500c90aaaf4f8c239b2db3c80365029d0f742bec..606cf6d7b4f44eed953c9615e2114d58f142d12a 100644 (file)
@@ -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("Audio files</td><td>(%d+)")) or 0)
+                               status.video = (tonumber(html:match("Video files</td><td>(%d+)")) or 0)
+                               status.image = (tonumber(html:match("Image files</td><td>(%d+)")) or 0)
                        end
                        fd:close()
                end