yWeb: add possibility to get minidlna webif; thx to DdD

Origin commit data
------------------
Branch: ni/coolstream
Commit: b342b7e033
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-01-23 (Sat, 23 Jan 2021)

Origin message was:
------------------
- yWeb: add possibility to get minidlna webif; thx to DdD

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2021-01-23 23:15:51 +01:00
parent 2f907c2ac5
commit 9143a9a90d
2 changed files with 15 additions and 0 deletions

View File

@@ -2,6 +2,9 @@
{=var-set:_p_list_sh={=script:Y_NI_Tools p_list sh=}=}
{=var-set:_p_list_lua={=script:Y_NI_Tools p_list lua=}=}
{=var-set:r_minidlnad={=script:Y_NI_Tools is_running minidlnad=}=}
{=var-set:minidlnadport={=script:Y_NI_Tools get_minidlnad_webif_port=}=}
{=var-set:r_xupnpd={=script:Y_NI_Tools is_running xupnpd=}=}
{=var-set:xupnpdport={=script:Y_NI_Tools get_xupnpd_webif_port=}=}
@@ -192,6 +195,10 @@
&nbsp;
</td>
<td>
{=if-equal:{=var-get:r_minidlnad=}~true~
<input type="button" value="WebInterface" onclick='goPort("{=var-get:minidlnadport=}");' />
~
=}
</td>
</tr>
<!-- djmount -->

View File

@@ -333,6 +333,14 @@ case "$action" in
printf "%s" ${_port:-8080}
;;
get_minidlnad_webif_port)
if [ -e /etc/minidlna.conf ]; then
_port=$(grep -m 1 "^[:space:]*port=" /etc/minidlna.conf | cut -d'=' -f2)
_port=$(echo $_port | dos2unix -u)
fi
printf "%s" $_port
;;
get_xupnpd_webif_port)
if [ -e /share/xupnpd/xupnpd.lua ]; then
_port=$(grep -m 1 "^[:space:]*cfg.http_port" /share/xupnpd/xupnpd.lua | cut -d'=' -f2)