[mythtv] "Missing Cover" in mythweb videos

Simon Kenyon simon at koala.ie
Fri Jan 15 16:56:34 UTC 2010


i was looking to see what videos i had and realised that there were no 
covers being displayed
thinking that i had messed up the data/video_covers symbolic link i 
check and sure enough i had
but they still would not appear
digging further i don't see how it could work

in the database the cover files are just bare filenames (no path 
information)
e.g. 0808151_coverart.jpg
but the code in modules/video/tmpl/default/video.php:337 goes:

<div id="<?php echo $video->intid; ?>_img"> <img <?php if 
($_SESSION["show_video_covers"] && file_exists($video->cover_file)) echo 
'src="'.$video->cover_url.'"'; echo ' 
width="'.$video->cover_scaled_width.'" 
height="'.$video->cover_scaled_height.'"'; ?> alt="<?php echo 
$video->cover_file.t('Missing Cover'); ?>"></div>

in particular i'm curious about the bit which goes:

file_exists($video->cover_file)

there is no path information
also in classes/Video.php:60

         if ($this->cover_file != 'No Cover' && 
file_exists($this->cover_file) ) {
             $this->cover_url = 
'data/video_covers/'.substr($this->cover_file, 
strlen(setting('VideoArtworkDir', hostname)));

which would lead me to conclude that the code assumes that the 
cover_file field is an absolue path
am i missing something or just being stupid?
--
simon



More information about the mythtv-dev mailing list