Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - bucaneer

31
Customization / Re: Cover size in SongTree
June 25, 2010, 20:40:52
I already had figured out a way to get the image size about right, but that looks much more elegant, thanks.

Might as well share the complete group skin, if anyone's interested:
{Group length}
title= with length
head=title:h+2
vcollapse=head
left=picsize
tail=3
title: text(pad=2, x=picsize+10, markup='<span font_desc="'.if($_expanded,normalfont,collapsedfont).'">\
<b>'.if(showartist,pesc($artist).'</b> - <b>').pesc($title).'</b><small>'.\
if(showyear && $year,' ('.pesc($year).')').\
if(showcount,' - '.pesc($nbsongs).' song'.if($nbsongs>1,'s')).\
if(showlength,'  '.pesc($length)).'</small></span>',\
init_markup='<span font_desc="'.normalfont.'"> </span>',)
pic: aapic(xalign=1, w=picsize, y=title:y, init_picsize=picsize, picsize=min(left,$_h), ypad=2)

picsize : OptionNumber(default=120,min=0,max=1000,step=10)
showyear : OptionBoolean(default=1,name='show year')
showlength : OptionBoolean(default=1,name='show length')
showcount : OptionBoolean(default=1,name='show song count')
showartist : OptionBoolean(default=1,name='show artist')
normalfont : OptionFont(default='URW Palladio L 16',name='font')
collapsedfont : OptionFont(default='URW Palladio L Italic 14',name='collapsed font')
32
Customization / Cover size in SongTree
June 25, 2010, 12:17:29
I can't seem to find a way to have the album art size vary depending on the group's size, similar to how it's done in SongList. Here's the relevant bits from my group skin configuration:

pic: +aapic(y=title:y,picsize=if($nbsongs<3,picsize/2,picsize),ypad=2)
pic2: -aapic(y=title:y,picsize=picsize/2,ypad=2)

picsize : OptionNumber(default=100,min=0,max=1000,step=10)


It should display a half-sized cover picture if there are less than 3 songs in the group when expanded, and always half-sized when collapsed. However, the check for $nbsongs in that particular context seems to break the player, it refuses to start, throwing:
Can't use an undefined value as an ARRAY reference at (eval 86) line 5.

If I remove the 'if' clause (or just change $nbsongs to some independent variable), it starts and works normally, including rendering a half-sized picture when collapsed (so the actual size change must be possible). I'm using latest build from git.

So, is this just not implemented yet, or did I miss some way around the problem?

EDIT: nevermind, fixed it by setting "init_picsize". Should've looked better at the SongTree documentation before messing too much. (Though on that note: the wiki page doesn't mention that $nbsongs is available for groups, had to look into source to find it.)
33
I can report a similar problem: after moving the currently playing song to the bottom of a playlist, playback stops with that particular song, even if I move it back up or add new songs to the playlist. The song count seems to go over the limits too, e.g. if a playlist has 50 songs and I start playing it from the beginning, Pos widget accurately shows "1/50", but when when I move playing song to the end, it changes to "51/50", not "50/50" like it should. If I add new songs afterwards, this pops up in terminal:

Use of uninitialized value in numeric ne (!=) at /home/justas/gmusicbrowser/gmusicbrowser_songs.pm line 2228.

I'm using the latest version from git and a custom layout that displays playlist in TabbedLists.


EDIT: the fix in git works perfectly, thanks!