gmusicbrowser Forum

Main board => Customization => Topic started by: aboettger on September 27, 2013, 22:42:45

Title: field "discname" in *.layout
Post by: aboettger on September 27, 2013, 22:42:45
I wanted to use the field in a separate group definition but gmb says: "unknown var 'discname'"

{Group gmb-art_artistalbum_breadcrumbs}
title=_"gmb-art - Album and artist breadcrumbs"
head=title:h
tail=25
vcollapse=head
vmin=pic:y+pic:h+25
left=pic:w+2
title: text(markup='<b><big>'.pesc($album).'</big></b>'. if($discname,'  <big><b>«</b></big>  '.pesc($discname)). if($year,'  <big><b>«</b></big>  '.pesc($year)) . '  <big><b>«</b></big> '.pesc($artist),pad=2)
pic: +aapic(y=title:h+title:y,picsize=picsize,ypad=2,xpad=1,aa='album')
picstars : picture(file=ratingpic($rating_avrg),x=(picsize/2)-(picstars:w/2),y=pic:y+pic:h,hide=picsize < 80)
nocover: picture(w=picsize,h=picsize,resize='s',file='gmb-art_nocover.png',y=title:h + title:y,hide=pic:wr || !shownocover)

shownocover: OptionBoolean(default=1,name='show a \'no cover\'')
picsize : OptionNumber(default=100,min=20,max=1000,step=10)
picstars : picture(file=ratingpic($rating_avrg),x=(picsize/2)-(picstars:w/2),y=pic:y+pic:h,hide=picsize < 80)
Title: Re: field "discname" in *.layout
Post by: aboettger on October 01, 2013, 10:44:47
No idea?
Title: Re: field "discname" in *.layout
Post by: Quentin Sculo on October 02, 2013, 21:49:43
Only a few group variables are supported currently. I've once made a patch to, if the variable is not known but is a song variable, use the common value for all songs, or empty (I think) if not all songs on the group have the same value. But I've never committed it, partly because I could add group variables that could clash with song variables.
I'll think about it, but I think I'll add discname and maybe a few other fields as group variables.
Title: Re: field "discname" in *.layout
Post by: aboettger on October 04, 2013, 13:42:21
Great, thank you. :)