Opened 13 years ago

Closed 12 years ago

#2809 closed defect (fixed)

If video cover is in subdirectory of /home/mythtv/.mythtv/MythVideo, mythweb thinks it does not exist

Reported by: spencercw@… Owned by: Rob Smith
Priority: minor Milestone: unknown
Component: mythweb Version: 0.20
Severity: medium Keywords:
Cc: Ticket locked: no

Description

In the video section of MythWeb, it takes the cover filename as 'data/video_covers/'.basename($show->coverfile), but this means if the cover image is in a subdirectory, such as /home/mythtv/.mythtv/MythVideo/SomeTVShow/series1.jpg, it looks for it in /home/mythtv/.mythtv/MythVideo/series1.jpg, can't find it and doesn't show it.

Attachments (1)

2809.patch (1.7 KB) - added by pholmes@… 12 years ago.
Use the video->cover_url for the image instead of the default path

Download all attachments as: .zip

Change History (7)

comment:1 Changed 13 years ago by xris

Resolution: invalid
Status: newclosed

There's nothing I can do about the permission structure in linux. Either put your covers somewhere globally accessible, or make your home directory world readable.

comment:2 Changed 13 years ago by anonymous

Resolution: invalid
Status: closedreopened

This has nothing to do with permissions. The script takes the location of the cover file, cuts off all the directories and tags data/video_covers/ on the front. This means that it looks for the file in the wrong place if it is in a subdirectory of /home/mythtv/.mythtv/MythVideo.

To be clear: /home/mythtv/.mythtv/MythVideo/filea.jpg will work. /home/mythtv/.mythtv/MythVideo/subdir/fileb.jpg will not, as it will look for /home/mythtv/.mythtv/MythVideo/fileb.jpg

comment:3 Changed 13 years ago by xris

Resolution: fixed
Status: reopenedclosed

(In [12314]) Better detection of cover artwork pathnames, which should properly handle artwork stored in subdirs of VideoArtworkDir?. closes #2809

comment:4 Changed 13 years ago by hp-mythtv.org@…

Resolution: fixed
Status: closedreopened

I'm on trunk/mythplugins, Rev. 13534 on video.php - which does not include any fix. I patched:

--- video.php.old 2007-08-15 23:57:48.000000000 +0200 +++ video.php 2007-08-16 00:03:30.000000000 +0200 @@ -374,7 +374,7 @@

<div id="<?php echo $video->intid; ?>_genre" class="hidden"><?php if (count($video->genres)) foreach ($video->genres as $genre) echo ' '.$genre.' ';?></div> <div id="<?php echo $video->intid; ?>_browse" class="hidden"><?php echo $video->browse; ?></div> <div id="<?php echo $video->intid; ?>-title" class="title"><a href="<?php echo $video->url; ?>"><?php echo htmlentities($video->title); ?></a></div>

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

+ <div id="<?php echo $video->intid; ?>_img"> <img <?php if (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 t('Missing Cover'); ?>"></div>

<div id="<?php echo $video->intid; ?>-category"> <?php echo $Category_String[$video->category]; ?></div> <div id="<?php echo $video->intid; ?>_playtime"> <?php echo nice_length($video->length * 60); ?></div> <div id="<?php echo $video->intid; ?>_imdb"> <?php if ($video->inetref != '00000000') { ?><a href="<?php echo makeImdbWebUrl($video->inetref); ?>"><?php echo $video->inetref ?></a><?php } ?></div>

comment:5 Changed 12 years ago by xris

Owner: changed from xris to Rob Smith
Status: reopenednew

Changed 12 years ago by pholmes@…

Attachment: 2809.patch added

Use the video->cover_url for the image instead of the default path

comment:6 Changed 12 years ago by Rob Smith

Resolution: fixed
Status: newclosed

(In [15491]) Fixes #2809, allows video covers to be in subfolders correctly. Thanks pholmes

Note: See TracTickets for help on using tickets.