Help - Search - Members - Calendar
Full Version: how to show disc number
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
adrianmak
Currently I show the disc number in the spl album group display as shown below

IPB Image



How do I move the disc number in area showing below
IPB Image
Maranatha
QUOTE(adrianmak @ Jul 3 2007, 22:28) *

Currently I show the disc number in the spl album group display as shown below

How do I move the disc number in area showing below



If it were me, I would do it this way:

I would first make sure that my Group Header was tall enough to contain all three lines of display. You may need to increase the number of rows used.

Anyways... The first line of information would be aligned as left,top. The graphic line I assume is aligned as left,middle.

Then I would just align the disc number section of code to be at left,bottom.

That should do it, altho I'm sure there are others who will have a different way to do what you want. But this should get you going in the right direction..


adrianmak
QUOTE(Maranatha @ Jul 4 2007, 18:19) *

QUOTE(adrianmak @ Jul 3 2007, 22:28) *

Currently I show the disc number in the spl album group display as shown below

How do I move the disc number in area showing below



If it were me, I would do it this way:

I would first make sure that my Group Header was tall enough to contain all three lines of display. You may need to increase the number of rows used.

Anyways... The first line of information would be aligned as left,top. The graphic line I assume is aligned as left,middle.

Then I would just align the disc number section of code to be at left,bottom.

That should do it, altho I'm sure there are others who will have a different way to do what you want. But this should get you going in the right direction..



should $alignabs() function to align text ?
what is the function to produce that graphic line ?
macca
QUOTE(adrianmak @ Jul 10 2007, 10:01) *

should $alignabs() function to align text ?
what is the function to produce that graphic line ?


-$alignabs() should work fine, I use it on mine.
-To get the line, I'm guessing that it's just a rectangle that is drawn using the $drawrect() function with a height of only 2 or 3. Otherwise it must be a .png image in the background of the header, but I imagine $drawrect() would be better to use, as you could change its colour etc very easily.

-mac
adrianmak
QUOTE(macca @ Jul 10 2007, 21:08) *

QUOTE(adrianmak @ Jul 10 2007, 10:01) *

should $alignabs() function to align text ?
what is the function to produce that graphic line ?


-$alignabs() should work fine, I use it on mine.
-To get the line, I'm guessing that it's just a rectangle that is drawn using the $drawrect() function with a height of only 2 or 3. Otherwise it must be a .png image in the background of the header, but I imagine $drawrect() would be better to use, as you could change its colour etc very easily.

-mac



Under foobar title formating, is it possible to execute a block of statement in a if conditional clause
For example

if albume has multiple disc, execute statements

$alignabs(5,50,100,30,left,top)
$font(Arial,15,bold,255-0-0)[Disc: %discnumber%]
$drawrect(10,75,$eval(%_width%-20),1,brushcolor-$getpvar(GDbarcolor) pencolor-null))

else for single disc album execute
$drawrect(10,58,$eval(%_width%-20),1,brushcolor-$getpvar(GDbarcolor) pencolor-null)
The Judge
Yes, you should be able to do that.

$if(%discnumber%,

$alignabs(5,50,100,30,left,top)
$font(Arial,15,bold,255-0-0)[Disc: %discnumber%]
$drawrect(10,75,$eval(%_width%-20),1,brushcolor-$getpvar(GDbarcolor) pencolor-null))
,

$drawrect(10,58,$eval(%_width%-20),1,brushcolor-$getpvar(GDbarcolor) pencolor-null)
)

That should do what you want providing the code you gave above was correct.
macca
I'm curious to know how to get the album art displayed to the left, and the playlist displayed to the right.

This is my code for item display:

CODE
$if(%_selected%,$drawrect(0,0,0,0,brushcolor-SYSCOL-13 pencolor-null))
$if(%_selected%,$textcolor(SYSCOL-9),$textcolor(SYSCOL-0))

// PerSecond
$puts(progress,$muldiv(%playback_time_seconds%,%_width%,%length_seconds%))
$ifgreater($get(progress),0,
$drawrect(0,0,0,0,brushcolor-SYSCOL-13 pencolor-192-192-192)
$drawrect(1,1,$get(progress),$sub(%_height%,2),brushcolor-192-192-192 pencolor-0-0-0)
,)

$drawrect(0,0,%_width%,1,brushcolor-null pencolor-null)

$padding(4,0)

$align(left,top)$textcolor(80-80-80)%list_index%
$align(left,top)$textcolor(255-255-255) %title%


I tried changing the padding, and the x-position of the rectangle (highlighted), but I couldn't get either to work effectively.

Appreciate some help.
Thanks, mac.
The Judge
$imageabs2(150,150,,$sub($mul(%_height%,%_itemindex%),$add(%_height%,4)),,%_height%,4,,$replace(%path%,%filename_ext%,folder.jpg),NOKEEPASPECT)

Something like that should work.
macca
Thanks I changed the code to this now:

CODE

$if(%_selected%,$drawrect(0,0,0,0,brushcolor-SYSCOL-13 pencolor-null))
$if(%_selected%,$textcolor(SYSCOL-9),$textcolor(SYSCOL-0))

// PerSecond
$puts(progress,$muldiv(%playback_time_seconds%,%_width%,%length_seconds%))
$ifgreater($get(progress),0,
$drawrect(0,0,0,0,brushcolor-SYSCOL-13 pencolor-192-192-192)
$drawrect(1,1,$get(progress),$sub(%_height%,2),brushcolor-192-192-192 pencolor-0-0-0)
,)

$imageabs2(150,150,,$sub($mul(%_height%,%_itemindex%),$add(%_height%,4)),,%_height%,4,,$replace(%path%,%filename_ext%,folder.jpg),NOKEEPASPECT)

$padding(4,0)
$align(left,top)$textcolor(80-80-80)%list_index%
$align(left,top)$textcolor(255-255-255) %title%


..but I still can't get the playlist to shift over to the right:

IPB Image

Any other ideas?

macca
When I change the padding to:
CODE
$padding(160,0)

..in the above code, I get this:
IPB Image
..Where the text gets cut off, and placed underneath creating that messy effect you can see. (When I increase the horizontal padding to anything over 210 it disappears completely, because the width of the playlist 'runs out')

Also I have to move all of the other playlist rectangles (background selection/progress bar etc) across individually. I'm sure there is an easier way to go about this, where my code is a little more organized than what you see above, but I don't know what it is unfortunately.

-mac
The Judge
Use $alignabs() instead of $align(). The way to get round having to keep changing the values for all the different things (rectangles etc) would be to have a PVAR that is set to the width of the album art or whatever you want.
macca
Thanks I've got it all working now using $alignabs() anyway. smile.gif
I do have another question; How can I get the album tracks to be numbered individually instead of being cumulative in the playlist? Something like this:

Album A
1
2
3
...
Album B
1
2
3
...

%list_index% and %playlist_number% don't work, so is there any other function?

Thanks, mac

Nevermind; I found out I've gotta use %tracknumber%, meaning that I have to make sure all each track has a tag for it :/
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.