Exemplo n.º 1
0
uksort($Program_Titles, 'by_no_articles');
ksort($Groups);
// Keep track of the program/title the user wants to view
if (isset($_REQUEST['title'])) {
    $_SESSION['recorded_title'] = $_REQUEST['title'];
}
if (isset($_REQUEST['recgroup'])) {
    $_SESSION['recorded_recgroup'] = $_REQUEST['recgroup'];
}
// The default sorting choice isn't so good for recorded programs, so we'll set our own default
if (!is_array($_SESSION['recorded_sortby']) || !count($_SESSION['recorded_sortby'])) {
    $_SESSION['recorded_sortby'] = array(array('field' => 'airdate', 'reverse' => true), array('field' => 'title', 'reverse' => false));
}
// Sort the programs
if (count($All_Shows)) {
    sort_programs($All_Shows, 'recorded_sortby');
}
// How much free disk space on the backend machine?
list($size, $used) = MythBackend::find()->sendCommand('QUERY_FREE_SPACE_SUMMARY');
if (function_exists('gmp_mul')) {
    // GMP functions should work better with 64 bit numbers.
    $size = gmp_mul('1024', $size);
    define(disk_size, gmp_strval($size));
    $size = gmp_mul('1024', $used);
    define(disk_used, gmp_strval($size));
} else {
    // This is inaccurate, but it's the best we can get without GMP.
    define(disk_size, $size * 1024);
    define(disk_used, $used * 1024);
}
// Load the class for this page
Exemplo n.º 2
0
    $schedule =& Schedule::find($key);
    // Ignore overrides
    #    if ($schedule->type == rectype_override)
    #        continue;
    #    if ($schedule->type == rectype_dontrec)
    #        continue;
    // Ignore manual schedules
    #    if ($schedule->category == 'Manual recording')
    #        continue;
    // Couple of modifications
    if ($schedule->type == rectype_dontrec) {
        $schedule->profile = '';
        $schedule->recgroup = '';
    }
    // Add a blank channel, to suppress warnings
    if (!$schedule->channel) {
        $schedule->channel = Channel::find(null);
    }
    // Add this show
    $the_schedules[] =& $schedule;
}
// Remove the reference. This prevents duplicate entries showing up in the list
unset($schedule);
// Sort the recordings
if (count($the_schedules)) {
    sort_programs($the_schedules, 'schedules_sortby');
}
// Load the class for this page
require_once tmpl_dir . 'schedules.php';
// Exit
exit;
Exemplo n.º 3
0
    foreach ($Results as $key => $show) {
        switch ($show->recstatus) {
            case 'WillRecord':
            case 'Conflict':
            case 'EarlierShowing':
            case 'LaterShowing':
                unset($Results[$key]);
                continue;
        }
    }
}
// Query cleanup
if (empty($Results)) {
    $Results = array();
} else {
    sort_programs($Results, 'search_sortby');
}
// Build a list of titles for figuring out alternate showings.  Use the same
// key to make parsing things below a little easier.
$titles = array();
$seen = array();
foreach ($Results as $key => $show) {
    $tkey = md5($show->channel->channum . ':' . $show->channel->callsign . ':' . $show->title . ':' . $show->subtitle . ':' . $show->description);
    $skey = $show->channel->name . $show->starttime . $tkey;
    if ($seen[$skey]) {
        unset($Results[$key]);
        continue;
    } else {
        $titles[$tkey][$key] =& $Results[$key];
        $seen[$skey] = true;
    }
Exemplo n.º 4
0
                    continue;
                }
            } elseif ($show->recstatus != 'Recording') {
                if (!$_SESSION['scheduled_recordings']['disp_deactivated'] || $_GET['skip_deactivated']) {
                    continue;
                }
            }
            // Show specific recgroup only
            if ($_SESSION['scheduled_recordings']['disp_recgroup'] && $show->recgroup != $_SESSION['scheduled_recordings']['disp_recgroup'] || $_GET['recgroup'] && $show->recgroup != $_GET['recgroup']) {
                continue;
            }
            // Show specific title only
            if ($_SESSION['scheduled_recordings']['disp_title'] && $show->title != $_SESSION['scheduled_recordings']['disp_title'] || $_GET['title'] && $show->title != $_GET['title']) {
                continue;
            }
            // Assign a reference to this show to the various arrays
            $all_shows[] =& $show;
        }
    }
}
unset($show);
// Sort the programs
if (count($all_shows)) {
    sort_programs($all_shows, 'scheduled_sortby');
    uksort($Groups, 'by_no_articles');
    uksort($Program_Titles, 'by_no_articles');
}
// Load the class for this page
require tmpl_dir . 'upcoming.php';
// Exit
exit;