It would probably be wiser to use a .fxd file instead of a symlink to
define the cover image.
Christian Lyra wrote:
> Hi,
>
> I´m writing a very simple plugin to let me choose a image file as a
> cover image to one image folder. The idea is to symlink a user choosen
> image to "cover.jpg". The problem is that freevo seems to cache
> the "cover.jpg" file, so even if I remove the symlink and create
> another freevo still shows the old image.
>
> Forgive me but the code is so small that I will paste it here:
>
> def actions(self,item):
> self.item = item
> if item.type == 'image':
> return [ (self.use_as_cover, 'User as cover')]
> return []
>
> def use_as_cover(self,arg=None, menuw=None):
> item = self.item
> try:
> os.unlink('%s/cover.jpg' % os.path.dirname(item.filename))
> except:
> pass
> try:
> os.symlink(item.filename, '%s/cover.jpg' %
> os.path.dirname(item.filename) )
> except:
> pass
>
>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel