Ejemplo n.º 1
0
        echo 'success';
    } else {
        echo "Failed to update the database for chanid {$_GET['chanid']} at {$_GET['starttime']}!";
    }
    exit;
}
// Load the jobqueue info
require_once 'includes/jobqueue.php';
// Load the sorting routines
require_once 'includes/sorting.php';
// Load the program info, unless a schedule was requested
$program = null;
if (empty($_GET['recordid'])) {
    // Starttime in the past -- See if it's a recording
    if ($_GET['starttime'] < time()) {
        $record = MythBackend::find()->queryProgramRows('QUERY_RECORDING TIMESLOT ' . $_GET['chanid'] . ' ' . unix2mythtime($_GET['starttime']), 1);
        if (is_array($record[0])) {
            $prog = new Program($record[0]);
            if ($_GET['chanid'] == $prog->chanid && $_GET['starttime'] == $prog->recstartts) {
                $program =& $prog;
            }
        }
    }
    // Load the program
    if (empty($program) || !$program->recstartts) {
        $program =& load_one_program($_GET['starttime'], $_GET['chanid'], $_GET['manualid']);
    }
}
// Get the schedule for this recording, if one exists
if ($program->recordid) {
    $schedule =& Schedule::find($program->recordid);
Ejemplo n.º 2
0
 /**
  * Gets a preview image of the requested show
  *
  * @todo, this should get put into a "recording" class or something like that.
  **/
 public static function get_preview_pixmap($hostname, $chanid, $starttime, $width = 160, $height = 120, $secs_in = null)
 {
     return MythBackend::find($hostname)->httpRequest('Content/GetPreviewImage', array('ChanId' => $chanid, 'StartTime' => unix2mythtime($starttime), 'Height' => $height, 'Width' => $width));
 }