Skip to content

Commit a518106

Browse files
committed
Further fix aspect ratio of the pixmaps
Turns out we were dividing custom aspect by the wrong number. It should be 1M, not 10k. Also put in a hacky little div to force the pixmap to be vertically centered rather than top-justified (works here anyways).
1 parent b70f00f commit a518106

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

modules/tv/classes/Program.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ public function getAspect() {
821821
case 13:
822822
return 2.21/1;
823823
case 14:
824-
return $row['data']/10000.0;
824+
return $row['data']/1000000.0;
825825
default:
826826
return 4/3;
827827
}

modules/tv/tmpl/default/recorded.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,11 @@
140140
echo " <td class=\"list\" rowspan=\"2\">&nbsp;</td>\n";
141141
?>
142142
<td rowspan="2" class="x-pixmap<?php
143-
if ($_SESSION['recorded_pixmaps']) { ?>">
143+
if ($_SESSION['recorded_pixmaps']) { ?>"><?php
144+
$padding = 39 - (50 / $show->getAspect());
145+
if ($padding > 0) { ?>
146+
<div style="height: <?php echo $padding; ?>px; width: 100px; float: left;">
147+
</div><?php } ?>
144148
<a class="x-pixmap" href="<?php echo root_url ?>tv/detail/<?php echo $show->chanid, '/', $show->recstartts ?>" title="<?php echo t('Recording Details') ?>"
145149
><img src="<?php echo $show->thumb_url(100,0) ?>" width="100" height="<?php echo floor(100 / $show->getAspect()); ?>"></a>
146150
<?php }

0 commit comments

Comments
 (0)