INTERACT FORUM

Windows => Plug-in Development => Topic started by: Messiahs on March 19, 2009, 02:00:03 am

Title: SDK Bug: MJFile.GetImageFile(MJImageFileFlags nImageFileFlag)
Post by: Messiahs on March 19, 2009, 02:00:03 am
Hi,

MJFile.MJGetImageFile gets the filename of an image associated with the file (MJFile), but the file itself is not updated when i first call
Code: [Select]
picPath =MJFile.GetImageFile(IMAGEFILE_THUMBNAIL_SMALL)and after this
Code: [Select]
picPath =MJFile.GetImageFile(IMAGEFILE_THUMBNAIL_LARGE)
Of course, the filepath is the same, but unlikely the file too.
The 'small' image file is not overwritten with the large one (folder: ..\J River\Media Center 13\Temp\Thumbnails).
If i first delete the small file before the second call, everthing is ok.

Can you please check this ?

Cheers,
Markus
Title: Re: SDK Bug: MJFile.GetImageFile(MJImageFileFlags nImageFileFlag)
Post by: Matt on March 19, 2009, 03:08:37 pm
I think this is carry-over from when thumbnails were physical files.

In Media Center 13.0.142 and later we'll try this:
Changed: Making an SDK request for a thumbnail will always resave the thumbnail instead of returning the file already on disk if the thumbnail was previously requested.

Hopefully it does the trick.
Title: Re: SDK Bug: MJFile.GetImageFile(MJImageFileFlags nImageFileFlag)
Post by: Messiahs on March 19, 2009, 04:08:58 pm
Hi Matt,

thanks for your feedback. Perhaps it's more easier to store small files in the folder "\Temp\Thumbnails\small" and large images in  folder "\Temp\Thumbnails\large"... just an idea.

regards,
Markus
Title: Re: SDK Bug: MJFile.GetImageFile(MJImageFileFlags nImageFileFlag)
Post by: Matt on March 19, 2009, 04:14:00 pm
Hi Matt,

thanks for your feedback. Perhaps it's more easier to store small files in the folder "\Temp\Thumbnails\small" and large images in  folder "\Temp\Thumbnails\large"... just an idea.

regards,
Markus

Are you requesting the same thumbnail over and over with the hope that Media Center won't have to create a new file if you've already requested it?
Title: Re: SDK Bug: MJFile.GetImageFile(MJImageFileFlags nImageFileFlag)
Post by: Messiahs on March 19, 2009, 05:06:19 pm
It would be great, but i don't know if this is possible. I think this can be a great performance gain for plugins who uses lists with covers.
Perhaps this could be handled with an additional flag like "GetImageFile(nImageFileFlag, overwrite)".
But, if this is to much work or not really necessary, i can live with the change that a image is overwriten.
Or do you have any other idea or a hint ?

Thanks,
Markus