Show entire path for ffmpeg monitors. Strip out username/password though

This commit is contained in:
Isaac Connor 2018-01-18 12:40:41 -08:00
parent 484a361af8
commit 95f054c1e6
1 changed files with 3 additions and 1 deletions

View File

@ -234,7 +234,9 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
$source = preg_replace( '/^.*\//', '', $monitor['Path'] );
} elseif ( $monitor['Type'] == 'Ffmpeg' || $monitor['Type'] == 'Libvlc' ) {
$url_parts = parse_url( $monitor['Path'] );
$source = $url_parts['host']. ( $url_parts['port'] ? ':'.$url_parts['port'] : '' );
unset($url_parts['user']);
unset($url_parts['pass']);
$source = unparse_url( $url_parts );
}
if ( $source == '' ) {
$source = 'Monitor ' . $monitor['Id'];