WebIf Tweaks: Server Status Indication (Content Sharing)

Matthew

Active Member
Some of us have occasional issues with Content Sharing turning itself off, this status can be checked in Diag->DLNA Reset but an immediate display is more convenient.

This change adds such a display to the header.

40894090

A tool-tip details the precise DLNA server status.

Diff:
--- /mod/webif/html/lib/topbar-orig.jim
+++ /mod/webif/html/lib/topbar.jim
@@ -27,11 +27,18 @@
if {[system model] eq "HDR" && [system usbdisks] > 0} {
     source /mod/webif/include/usbeject.jim
}
+set dmson [system param DMS_START_ON]
+set lstn [system is_listening 9000]
+set stat [expr $dmson?"Server is enabled":"Server is disabled"]
+set img [expr $dmson && $lstn?"181_1_00_Help2_Green.png":"181_1_00_Help1_Red.png"]
+set stat [expr $lstn?"$stat and is running.":"$stat and is NOT running."]
source /mod/webif/include/vfd.jim
-puts {
+puts "
<div id=idletime></div>
-</div>
-}
+<div id=serverstat>
+Server Status: &nbsp;<img class=va src=/images/$img title=\"$stat\">
+</div></div>
+"
source /mod/webif/include/toolbar.jim
puts {
<script type=text/javascript src=/js/topbar.js></script>
Diff:
--- /mod/webif/html/css/style-orig.css
+++ /mod/webif/html/css/style.css
@@ -94,7 +94,7 @@
     font-family: vfd, 'Lucida Console', Monaco, monospace;
}

-#idletime
+#idletime, #serverstat
{
     position: absolute;
     left: 50px;
    top: 45px;
     font-style: italic;
     font-size: 12px;
}
-
+#serverstat {
+  left: 32px;
+  top: 65px;
+}
+#serverstat img{
+  width: 26px;
+  height: 26px;
+}
div.footer
{
     clear: both;
 
OP
Matthew

Matthew

Active Member
I have been wondering, when content share turns itself off, the solution to get the DLNA server running again is to turn it on, then off, then back on in the box menu, if the process in 'boot settings' did that instead of just turning on (which results in content share showing as on but DLNA server NOT running), would that method solve the problem?
 

MymsMan

Ad detector
AFAIK bootsettings just updates the settings database to the desired values but doesn't actually apply the settings so it would not be possible to do it within the existing package - remember not all boots are supposed to start the DLNA server - it doesn't start for background recording.

It would be great if we could work out how to start the DLNA server the same way that the box menu does and without fully waking the first because fhen we could do decryption and ad detection in half awake statd
 
Top