"; $top_line = "
"; $middle_line = "
"; $bottom_line = "
"; $side_channel = "
Channel $channel_num
"; $position_half = ""; $top_line = "
"; $middle_line = "
"; $bottom_line = "
"; $side_channel = "
Channel $channel_num
"; $position_play_full = "
";
}
if(strcmp($channel_num," ")<=0){
$channel_num=0;
}
//If Nothing is Playing
$text_color='cyan';
$text_color_alt='cyan';
if ($DisplayType == 'full') {
$position=$position_idle_full;
}
if ($DisplayType == 'half') {
$position=$position_half;
}
if ($pgrep >= 1) { //PSEUDO CHANNEL ON
$top_section = $time_style . $date . "" . $position;
$middle_section = $top_line . "Channel $channel_num";
$bottom_section = $middle_line . "";
$nowplaying = "Channel $channel_num Standing By...";
} else { //PSEUDO CHANNEL OFF
$top_section = $time_style . $date . "" . $position;
$middle_section = $top_line . $day . "";
$bottom_section = "";
$nowplaying = "Please Stand By...";
}
if ($xml['size'] != '0') { //IF PLAYING CONTENT
foreach ($xml->Video as $clients) {
if($clients->Player['title'] == $plexClientName) { //If the active client on plex matches the client in the config
//IF PLAYING COMMERCIAL
if($clients['type'] == "movie" && $clients['duration'] < 1800000) {
#$text_color='cyan';
#$text_color_alt='cyan';
if ($DisplayType == 'full') {
$position=$position_idle_full;
}
if ($DisplayType == 'half') {
$position=$position_half;
}
$top_section = $time_style . $date . "" . $position;
$middle_section = $top_line . $clients['librarySectionTitle'] . "";
$bottom_section = "";
$title_clean = str_replace("_", " ", $clients['title']);
$nowplaying = "Now Playing: " . $title_clean . " on Channel ". $channel_num . "";
}
//IF PLAYING MOVIE
if($clients['type'] == "movie" && $clients['duration'] >= 1800000) {
$text_color='yellow';
$text_color_alt='white';
if ($DisplayType == 'half') {
$art = $clients['thumb'];
$background_art = "| Channel | Time | Title |
|---|---|---|
| "; $nowtable = $tableheader; $doheader = "1"; } if ($chnum == $ch_number) { $channelplaying = "font-weight:bold;font-size:1.1em"; } else { $channelplaying = ""; } if ($rightnow >= $start_time_unix && $rightnow <= $end_time_unix) { $nowtable .= " | ||
|---|---|---|
| " . $ch_number . " | "; $nowtable .= "" . $start_time_human . " - " . $end_time_human . " | "; $nowtable .= " "; if ($attributes['type'] == "TV Shows") { $nowtable .= $attributes['show-title']; $nowtable .= " S" . $attributes['show-season'] . "E" . $attributes['show-episode'] . " - " . $attributes['title'] . " | "; } elseif ($attributes['type'] == "Commercials") { $nowtable .= $attributes['type'] . ""; } else { $nowtable .= $attributes['title'] . ""; } } if ($results[$ch_file] == "") { $results[$ch_file] = $chantableheader . "Channel " . $ch_number . "Time | Title | "; } if ($rightnow >= $start_time_unix && $rightnow < $end_time_unix) { $isnowplaying = "font-weight:bold;font-size:1.2em"; } else { $isnowplaying = ""; } if ($attributes['type'] != "Commercials") { $results[$ch_file] .= "
| " . $start_time_human . " - " . $end_time_human . " | "; $results[$ch_file] .= ""; if ($attributes['type'] == "TV Shows") { $results[$ch_file] .= $attributes['show-title']; $results[$ch_file] .= " S" . $attributes['show-season'] . "E" . $attributes['show-episode'] . " - " . $attributes['title'] . " | "; } elseif ($attributes['type'] == "Commercials") { $results[$ch_file] .= $attributes['type'] . ""; } else { $results[$ch_file] .= $attributes['title'] . ""; } } } } $nowtable .= "|