show port when it's not the standard port

This commit is contained in:
Isaac Connor 2018-01-19 12:15:26 -05:00
parent f4b6360f14
commit e26747b5cc
1 changed files with 2 additions and 1 deletions

View File

@ -231,7 +231,8 @@ 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'] : '' );
$source = $url_parts['host']. (
( $url_parts['port'] and ( $url_parts['port'] != '554' and $url_parts['port'] != '80' ) ) ? ':'.$url_parts['port'] : '' );
}
if ( $source == '' ) {
$source = 'Monitor ' . $monitor['Id'];