Author Topic: field "discname" in *.layout  (Read 2761 times)

aboettger

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
field "discname" in *.layout
« on: September 28, 2013, 03:42:45 »
I wanted to use the field in a separate group definition but gmb says: "unknown var 'discname'"

Code: [Select]
{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)

aboettger

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: field "discname" in *.layout
« Reply #1 on: October 01, 2013, 15:44:47 »
No idea?

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: field "discname" in *.layout
« Reply #2 on: October 03, 2013, 02: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.

aboettger

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: field "discname" in *.layout
« Reply #3 on: October 04, 2013, 18:42:21 »
Great, thank you. :)