diff --git a/data/y-web/Y_NI_Plugin-control.yhtm b/data/y-web/Y_NI_Plugin-control.yhtm index 18458c9cb..1b55a12a1 100644 --- a/data/y-web/Y_NI_Plugin-control.yhtm +++ b/data/y-web/Y_NI_Plugin-control.yhtm @@ -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 @@   + {=if-equal:{=var-get:r_minidlnad=}~true~ + + ~ + =} diff --git a/data/y-web/scripts/Y_NI_Tools.sh b/data/y-web/scripts/Y_NI_Tools.sh index a07a89859..b3bce3d10 100644 --- a/data/y-web/scripts/Y_NI_Tools.sh +++ b/data/y-web/scripts/Y_NI_Tools.sh @@ -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)