Help - Search - Members - Calendar
Full Version: Album art in Panels UI/SCPL
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
mundschuss
here's a question:

i want to have that every album "chapter" is that big that the album cover is displayed at max (here 200px) even if the album just contains 2 songs.

IPB Image

CODE
// *** ALIGNMENT VARIABLES ***
$puts(imgwmax,200)
$puts(rowheight,17)
$puts(calcimgh,$mul(%_itemcount%,$get(rowheight)))
$puts(imgw,
$if($fileexists($get(albumartsrc)),
$if($greater($get(calcimgh),$get(imgwmax)),$get(imgwmax),$get(calcimgh))
,0))
$puts(rightpad,$sub(%_width%,$get(imgw),10))

$puts(colpad,10)
$puts(colw,20)
$puts(colwtrackno,25)
$puts(textleft,$if($greater(%_itemcount%,1),$add($add($get(leftpad),0),$get(colpad)),$get(colpad)))
$puts(aligntrackno,$alignabs($get(textleft),-4,$get(colwtrackno),25,center,middle))
$puts(aligntrack,$alignabs($add($get(textleft),$get(colwtrackno)),0,$sub(%_width%,$add($add($get(textleft),$get(colwtrackno)),35)),$get(rowheight),left,middle))
$puts(aligntime,)

// *** ALBUM ART DISPLAY & PNG OVERLAY ***
$if($and($fileexists($get(albumartsrc)),$greater(%_itemcount%,1)),
$imageabs2($get(imgw),$get(imgw),,$mul($get(rowheight),$sub(%tracknumber%,1)),$get(imgw),$get(rowheight),$get(rightpad),,$get(albumartsrc),KEEPASPECT)
$imageabs2($get(imgw),$get(imgw),,$mul($get(rowheight),$sub(%tracknumber%,1)),$get(imgw),$get(rowheight),$get(rightpad),,$get(albumartoverlay),NOKEEPASPECT ALPHA-50)
,)



// *** ALTERNATE ROW COLOURS ***
$if($greater($mod(%list_index%,2),0),
$drawrect($get(textleft),0,$sub(%_width%,$add($get(imgwmax),24)),0,brushcolor-$get(colorRowBg1) pencolor-$get(colorRowBg1)),
$drawrect($get(textleft),0,$sub(%_width%,$add($get(imgwmax),24)),0,brushcolor-$get(colorRowBg2) pencolor-$get(colorRowBg2))
)

// *** DRAW SELECTED, PLAYING AND FOCUSED BOXES ***
$if($or(%_selected%,%isplaying%),$drawrect($get(textleft),0,$sub(%_width%,$add($get(imgwmax),24)),0,brushcolor-$get(colorSelectedBg) pencolor-null))
$if(%_focused%,$drawrect($get(textleft),0,$sub(%_width%,$add($get(imgwmax),24)),0,brushcolor-null pencolor-80-80-80))
$if(%isplaying%,$drawrect($get(textleft),0,$sub(%_width%,$add($get(imgwmax),24)),0,brushcolor-null pencolor-0-0-0))
$if($or(%_selected%,%isplaying%),$textcolor(SYSCOL-9),$textcolor(SYSCOL-8))

// *** TRACK NO. COL ***
$if($or(%_selected%,%isplaying%),,
$get(aligntrackno)
$get(fontTrackNumber)
$if($strstr(%genre%,Classical),$roman(%tracknumber%),%tracknumber%))

// *** PROGRESS BAR ***
$if(%isplaying%,
$padding($add($get(textleft),8),0)
$puts(progress,$muldiv(%playback_time_seconds%,$sub(%_width%,$add($get(imgwmax),30)),%length_seconds%))
$ifgreater($get(progress),0,
$drawrect(-7,1,$get(progress),15,brushcolor-$get(colorProgressBar) pencolor-null)
,)
)

// *** NORMAL PLAYLIST ***
// Determine if Various Artists album based on filename (VA, OST, DJ Kicks)
$if($or($strstr(%album artist%,Various),$strcmp($substr(%album%,1,3),VA )),

// *** VARIOUS ALBUMS ***
$if($or(%_selected%,%isplaying%),
$get(aligntrack)
$get(fontPlayingArtist)
%artist% -
$get(fontPlayingTitle)
%title%
,

// When Not Selected
$get(aligntrack)
$if($and($strcmp($get(HighlightTracksMissingReplaygain),1),$not(%__replaygain_album_gain%)),$get(fontTitleMissingRG),$get(fontTitle))
%title%
$alignabs($add($get(textleft),$get(colwtrackno)),0,$sub(%_width%,$add($add($get(textleft),$get(colwtrackno)),145)),$get(rowheight),right,middle)
%artist% s
),

// *** NORMAL ALBUMS ***
$get(aligntrack)
$if($or(%_selected%,%isplaying%),
$get(fontPlayingArtist)
%artist% -
$get(fontPlayingTitle)
%title%
,
$if($and($strcmp($get(HighlightTracksMissingReplaygain),1),$not(%__replaygain_album_gain%)),$get(fontTitleMissingRG),$get(fontTitle))
%title%
))


what have i to change to become this?

Moderation: Please do not inline images larger than roughly 800x600 and 80KB. Please use thumbnails and/or links for large pictures instead. Also converted code to codebox.
eddy@
QUOTE
i want to have that every album "chapter" is that big that the album cover is displayed at max (here 200px) even if the album just contains 2 songs.

You can't. According to your picture, the size of the album art depends on the number of track items.
The "Row heigt of item display" and the "Group rows" of group display are alway the limitation.
If you want to set the album art to the a larger size, you can set the group rows bigger. In the group and item display, your scripts should show a part of the album art.
Hard to explain. Why do you want to use the complicated plugin? It waste me a lot of time but still can't say I really understand it.
Every developer can create his own syntax, and this is a terrible pain. The users should pray!
mundschuss
mh, but i saw it somewhere but, ok

which new plugin do you mean?
Falstaff
QUOTE(mundschuss @ May 23 2008, 18:52) *

mh, but i saw it somewhere but, ok

which new plugin do you mean?


possible in columnsUI (i've see a screeshot doing it maybe in the appearence topic) but i don't know how

the config you present in your 1st post is using SCPL so panelsUI, and like eddy said, you can't.

EDIT :
seen here : http://www.hydrogenaudio.org/forums/index....st&p=561169
callisto
Possible if you put your cover completely in the groupheader (SCPL, see falstaff's link) or with ELPlaylist
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.