Ticket #6700: mythweb-6700-use_hostname_for_preview_pixmaps.patch
File mythweb-6700-use_hostname_for_preview_pixmaps.patch, 2.7 KB (added by , 15 years ago) |
---|
-
mythweb/modules/tv/classes/Program.php
515 515 if ($height == 0) 516 516 $height = floor($width / $this->getAspect()); 517 517 518 return root."tv/get_pixmap/{$this-> chanid}/{$this->recstartts}/$width/$height/$secs_in/$filename.{$width}x{$height}x$secs_in.png";518 return root."tv/get_pixmap/{$this->hostname}/{$this->chanid}/{$this->recstartts}/$width/$height/$secs_in/$filename.{$width}x{$height}x$secs_in.png"; 519 519 } 520 520 521 521 /** … … 523 523 * 524 524 * @todo, this should get put into a "recording" class or something like that. 525 525 /**/ 526 public static function get_preview_pixmap($ chanid, $starttime, $width=160, $height=120, $secs_in=null) {526 public static function get_preview_pixmap($hostname, $chanid, $starttime, $width=160, $height=120, $secs_in=null) { 527 527 // We have to calulate $secs_in from the db 528 528 if (is_null($secs_in)) 529 529 $secs_in = _or(get_backend_setting('PreviewPixmapOffset'), 64) 530 530 + _or(get_backend_setting('RecordPreRoll'), 0); 531 531 532 return MythBackend::find( )->httpRequest('GetPreviewImage', array('ChanId' => $chanid,532 return MythBackend::find($hostname)->httpRequest('GetPreviewImage', array('ChanId' => $chanid, 533 533 'StartTime' => unix2mythtime($starttime), 534 534 'Height' => $height, 535 535 'Width' => $width, -
mythweb/modules/tv/get_pixmap.php
13 13 * 14 14 /**/ 15 15 16 $chanid = $Path[2]; 17 $starttime = $Path[3]; 18 $width = $Path[4]; 19 $height = $Path[5]; 20 $seconds_in = $Path[6]; 16 $hostname = $Path[2]; 17 $chanid = $Path[3]; 18 $starttime = $Path[4]; 19 $width = $Path[5]; 20 $height = $Path[6]; 21 $seconds_in = $Path[7]; 21 22 22 23 if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) { 23 24 if (strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $starttime) { … … 26 27 } 27 28 } 28 29 29 $data = Program::get_preview_pixmap($ chanid, $starttime, $width, $height, $seconds_in);30 $data = Program::get_preview_pixmap($hostname, $chanid, $starttime, $width, $height, $seconds_in); 30 31 if (strlen($data)) { 31 32 header('Pragma: public', true); 32 33 header('Content-Type: image/png');