Modify

Opened 4 years ago

Last modified 3 years ago

#17222 assigned defect

luci-app-minidlna can't display Minidlna Status

Reported by: axxixihaha Owned by: jow
Priority: normal Milestone: Chaos Calmer 15.05
Component: luci Version: Trunk
Keywords: Cc:

Description

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)

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by swalker

  • Owner set to jow
  • Status changed from new to assigned

comment:2 Changed 3 years ago by anonymous

What the patch?

Add Comment

Modify Ticket

Action
as assigned .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.