Help - Search - Members - Calendar
Full Version: foo_uie_trackinfo_mod
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
dpx
Hi, I have a problem with covers - I have:

QUOTE
$imageabs2(300,300,0,0,0,0,10,10,/images\default.*,)
$imageabs2(300,300,0,0,0,0,10,10,$replace(%path%,%filename_ext%,*front*.*),)
$imageabs2(300,300,0,0,0,0,10,313,$replace(%path%,%filename_ext%,*front*.*),ROTATEFLIP-6)
$imageabs2(0,0,0,0,0,0,0,313,/images\LE5\overlay3.png,)


As you see default image is always display - album cover only if the cover is in album directory - that's fine but if cover is smaller or is more width than height i see the default cover under it. I want to have something like this:

QUOTE
if (in folder is cover) then
display cover
else
display default

But i dont know how to do that - please help me.

I Try:
QUOTE
$if($fileexists($replace(%path%,%filename_ext%,folder.*),
$imageabs2(300,300,0,0,0,0,10,10,$replace(%path%,%filename_ext%,*front*.*),)
$imageabs2(300,300,0,0,0,0,10,313,$replace(%path%,%filename_ext%,*front*.*),ROTATEFLIP-6)
,
$imageabs2(300,300,0,0,0,0,10,10,/images\default.*,)
)
$imageabs2(0,0,0,0,0,0,0,313,/images\LE5\overlay3.png,)

But it doesn't work.

The best will be if the cover's in album folder will cycle (each one will be display for 20 seconds or something) - of course if there's no cover default will be displayed.
matosman
I use very easy code, work and it's enough for me. biggrin.gif

CODE
$imageabs2(290,245,0,0,0,0,$get(DstXCover1),0,C:\Program Files\foobar2000\images/default.png,NOKEEPASPECT)
$imageabs2(229,210,0,0,0,0,$get(DstXCover2),12,$replace(%path%,%filename_ext%,folder.jpg),NOKEEPASPECT)
$imageabs2(290,245,0,0,0,0,$get(DstXCover1),0,C:\Program Files\foobar2000\images/cover_effet.png,NOKEEPASPECT)


first line is default picture, second is cover picture took in album folder and last just one effect.

If no cover in folder album, it's show only defaut picture.

Yotsuya
This would be my suggestion:
CODE
$puts(album.art,$replace(%path%,%filename_ext%,*front*.*))

$if($fileexists($get(album.art)),
$imageabs2(300,300,0,0,0,0,10,10,$get(album.art),)
$imageabs2(300,300,0,0,0,0,10,313,$get(album.art),ROTATEFLIP-6)
,
$imageabs2(300,300,0,0,0,0,10,10,/images\default.*,)
)
$imageabs2(0,0,0,0,0,0,0,313,/images\LE5\overlay3.png,)


As for the cycling images thing I don't think there is currently a way to cycle between wildcard matches however if you name your cover art in a predictable pattern you can probably pull something off by combining $select() and $rand().

Note that in your code attempt you are checking for folder.* then displaying *front*.* so unless you have something named folder.*front*.* that probably wont work. In my example I set the image source to a constant variable "album.art" to avoid such confusion and to make things easier should one choose to change the image source.

EDIT: Fixed my own sloppy coding smile.gif
dpx
QUOTE(Yotsuya @ Feb 12 2007, 06:13) *

This would be my suggestion:
CODE
$puts(cover.art,$replace(%path%,%filename_ext%,*front*.*))

$if($fileexists($get(album.art)),
$imageabs2(300,300,0,0,0,0,10,10,$get(album.art),)
$imageabs2(300,300,0,0,0,0,10,313,$get(album.art),ROTATEFLIP-6)
,
$imageabs2(300,300,0,0,0,0,10,10,/images\default.*,)
)
$imageabs2(0,0,0,0,0,0,0,313,/images\LE5\overlay3.png,)


As for the cycling images thing I don't think there is currently a way to cycle between wildcard matches however if you name your cover art in a predictable pattern you can probably pull something off by combining $select() and $rand().

Note that in your code attempt you are checking for folder.* then displaying *front*.* so unless you have something named folder.*front*.* that probably wont work. In my example I set the image source to a constant variable "cover.art" to avoid such confusion and to make things easier should one choose to change the image source.

Thank you very much Yotsuya! It's work perfectly!

I change in first line cover.art to album.art (small mistake) wink.gif
dpx
Hi, I have another question - I want to have something like this:

CODE

if isplaying then show cover
if there is no cover show image1
if ispaused or stopped show image2


For now I have:

CODE

$puts(album.art,$replace(%path%,%filename_ext%,*front*.jpg))

$if($fileexists($get(album.art)),
$imageabs2(300,300,0,0,0,0,10,10,$get(album.art),)
$imageabs2(300,300,0,0,0,0,10,313,$get(album.art),ROTATEFLIP-6)
,
$imageabs2(300,300,0,0,0,0,10,10,/images\default2.*,)
$imageabs2(300,300,0,0,0,0,10,313,/images\default2.*,ROTATEFLIP-6)
)
$imageabs2(0,0,0,0,0,0,0,313,/images\LE5\overlay3.png,)


Could you help me, please smile.gif
shakey_snake
If you know the logic, why can't you do it yourself?

$if(this is true,then do this,else do this)

dpx
QUOTE(shakey_snake @ Mar 24 2007, 23:58) *

If you know the logic, why can't you do it yourself?

$if(this is true,then do this,else do this)


Because I don't know how to do that. I try but it never want to work. First I try do something by myself, if I can't then I write for help - not in the other way wink.gif
Yotsuya
CODE
$puts(album.art,$replace(%path%,%filename_ext%,*front*.jpg))

$if(%isplaying%,$if(%ispaused%,
$imageabs2(300,300,0,0,0,0,10,10,/images\image2.*,)
$imageabs2(300,300,0,0,0,0,10,313,/images\image2.*,ROTATEFLIP-6)
,
$if($fileexists($get(album.art)),
$imageabs2(300,300,0,0,0,0,10,10,$get(album.art),)
$imageabs2(300,300,0,0,0,0,10,313,$get(album.art),ROTATEFLIP-6)
,
$imageabs2(300,300,0,0,0,0,10,10,/images\image1.*,)
$imageabs2(300,300,0,0,0,0,10,313,/images\image1.*,ROTATEFLIP-6)
))
,
$imageabs2(300,300,0,0,0,0,10,10,/images\image2.*,)
$imageabs2(300,300,0,0,0,0,10,313,/images\image2.*,ROTATEFLIP-6)
)
$imageabs2(0,0,0,0,0,0,0,313,/images\LE5\overlay3.png,)

Please practice coding this is not that much different than the code you already had and you pretty much already broke down the logic in your question. Open an extra track display panel for code testing and replace the complicated portions with more basic functions. for example:
CODE
$if(%isplaying%,
$if(%ispaused%,PAUSED,ALBUM ART),
STOPPED)

once you get the basic decision making logic worked out it is an easy matter to drop the image functions in place of the words.
dpx
Thank you very much Yotsuya, again! smile.gif It works perfectly. Now I understand how it works, thanks!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.