Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_uie_single_column_playlist (Read 739003 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_uie_single_column_playlist

Reply #1175
will have to DL this....

foo_uie_single_column_playlist

Reply #1176
Okay, I've caved. I've decided to start using SCPL. I've got my layout done, but I'm stumped on the code. What I want to do is drawn out in a screenshot done in Paint (of all programs!). I will install another program soon.

I apologise for saving the image as a .gif in paint, I didn't know it was going to do that. Eurgh.
[a href="http://img201.imageshack.us/my.php?image=foobarscplpf3.gif" target="_blank"]

EDIT2:
I'm completely done...unless tomorrow I find something wrong.

foo_uie_single_column_playlist

Reply #1177
is there a tag to show the lenght in time of each group?

foo_uie_single_column_playlist

Reply #1178
Hello.

I have a simple question fo this great plugin.
I've this command to show an image for my music within the playlist

$imageabs2(46,46,0,0,46,46,291,1,$replace(%path%,%filename_ext%,\covers & tracklist\front.jpg),)

but if the image does not exist, it (who wonders) displays nothing

so how can i point the plugin to a different location that it shows another image, if the first one does not exist?

foo_uie_single_column_playlist

Reply #1179
Hello.

I have a simple question fo this great plugin.
I've this command to show an image for my music within the playlist

$imageabs2(46,46,0,0,46,46,291,1,$replace(%path%,%filename_ext%,\covers & tracklist\front.jpg),)

but if the image does not exist, it (who wonders) displays nothing

so how can i point the plugin to a different location that it shows another image, if the first one does not exist?

$if($fileexists($replace(%path%,%filename_ext%,\covers & tracklist\front.jpg)),
$imageabs2(46,46,0,0,46,46,291,1,$replace(%path%,%filename_ext%,\covers & tracklist\front.jpg),),
$imageabs2(46,46,0,0,46,46,291,1,'images/noalbum.png',))

I hope I got all the brackets and $s right - missing something like that always makes debugging fun

(note: $fileexists is specific to this component (and trackinfo_mod), AFAIK)
Life is Real...
(But not in audio :) )

foo_uie_single_column_playlist

Reply #1180
jerika: There are two approaches you can use to create a "no cover" image.

1) Layering: You can have SCPL display the no-cover image, then overlay your cover art on top of that image so that it will only appear for albums with no cover. Using your example your code would go something like this:
Code: [Select]
$imageabs2(46,46,0,0,46,46,291,1,images\nocover.png,)
$imageabs2(46,46,0,0,46,46,291,1,$replace(%path%,%filename_ext%,\covers & tracklist\front.jpg),)
2) $fileexists(): You can test to see if the coverart file exists. Then, if it exists display it otherwise display a the no cover image. Again using your example your code would go something like this:
Code: [Select]
$if($fleexists($replace(%path%,%filename_ext%,\covers & tracklist\front.jpg),
$imageabs2(46,46,0,0,46,46,291,1,$replace(%path%,%filename_ext%,\covers & tracklist\front.jpg),),
$imageabs2(46,46,0,0,46,46,291,1,images\nocover.png,)
)

Both of these examples assume your "no cover" images is a file called nocover.png in your foobar images directory. The $fileexists() approach appears to use less memory because it reduces the number of images loaded however if you want to start checking for many different kinds of images then the code gets rather complicated. The layering approach offers more flexibility when using many different types of images however it consumes more memory because it renders all the images even the "hidden" layers. 

I personally use a combination of the two to construct covers inside pictures of cd cases, filling in empty gaps, and with a picture of a cd instead of the cover when the cover doesnt exist:
Code: [Select]
// Album Art
$if($get(album_mode),$ifgreater($mul(%_height%,%_itemcount%),95,
$imageabs2(107,95,,$mul(%_height%,$sub(%_itemindex%,1)),,%_height%,2,,images\case.png,)
$if($fileexists($replace(%path%,%filename_ext%,$if2(%cdid%,[%artist% - ]$replace(%album%,?,,:,)).*)),
$drawrect(17,$sub(5,$mul(%_height%,$sub(%_itemindex%,1))),85,85,brushcolor-255-255-255 pencolor-null)
$imageabs2(85,85,,$sub($mul(%_height%,%_itemindex%),$add(%_height%,5)),,%_height%,17,,$replace(%path%,%filename_ext%,$if2(%cdid%,[%artist% - ]$replace(%album%,?,,:,)).*),)
,
$imageabs2(107,95,,$mul(%_height%,$sub(%_itemindex%,1)),,%_height%,2,,images\cd.png,)
)
,),)

Feature Request: I would like to request that this component support the / in front of image paths the way trackinfomod does so that images load properly when foobar is loaded from an alternate location. I downloaded the latest version of SCPL and tried it but my images do not load with the / in front. i.e.:
$imageabs2(46,46,0,0,46,46,291,1,/images\nocover.png,)
vs.
$imageabs2(46,46,0,0,46,46,291,1,images\nocover.png,)

foo_uie_single_column_playlist

Reply #1181
@Yotsuya and Kalmark

Many thanks to your fast support, I'm impressed how friendly and courteously you give me assistance, instead of shouting read the fuckin manual

and btw...it works

best regards!

foo_uie_single_column_playlist

Reply #1182
please can single columns be updated so it has the same features as track info mod... please...

foo_uie_single_column_playlist

Reply #1183
Whenever I open a Mp3 from the command line and foobar2k is not already open, images in single column playlist wont show. fonts, alignments... everything else is fine. anyone knows what's causing this, or better, how to fix this?

It only happens when foobar is NOT running and i'm opening mp3s from the command line.

 

foo_uie_single_column_playlist

Reply #1184
BelleAndZEK: This has been discussed before. When you load an mp3 while foobar is not running, foobar is launched with the active directory being that of the mp3 file instead of the main foobar directory. You will find this behavior common to any windows program linked with file associations. When you launch foobar from it's shortcut, it will run with the main foobar as the active directory (or whatever directory you spcified in the shortcut properties). The result is that when SCPL evaluates code like:

$imageabs2(100,100,,,,,10,10,images\image.png,)

it attempts to load x:\path\to\your\mp3\file\images\image.png instead of x:\your\foobar\directory\images\image.png.  The quick fix is to change your code to load images explicitly from the foobar image directory like this:

$imageabs2(100,100,,,,,10,10,x:\your\foobar\directory\images\image.png,)

However trackinfomod has already implemented a nice fix for this situation and we are waiting for the changes to carry over to singlecolumnplaylist so that we can do code like this:

$imageabs2(100,100,,,,,10,10,/images\image.png,)

Where the initial forward slash is automatically resolved to the foobar directory.

foo_uie_single_column_playlist

Reply #1185
Hi:
I want the group display to stay visible when I use the scroll bar.

group by is:
%album%

item display is:

$ifequal($mod(%_itemindex%,2),0,
$drawrect(0,0,0,0,pencolor-0-0-0 alpha-30),)

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

$padding(4,0)
$align(right,top)%title%
$align(left,top)%artist%

group display is:

$drawrect(0,0,0,0,brushcolor-0-0-0 pencolor-0-0-0 ALPHA-100)
$drawrect(0,0,0,%_height%,brushcolor-null pencolor-0-0-0)

$font(,,bold,255-255-255)
$alignabs(2,0,$sub(%_width%,2),$div(%_height%,4),left,top)%album%
$alignabs(0,0,$sub(%_width%,2),$div(%_height%,4),right,bottom)%genre%
$alignabs(2,17,$sub(%_width%2),$div(%_height%,5),left,top)%artist%
$alignabs(0,0,$sub(%_width%,2),$div(%_height%,4),right,top)%date%

//artwork

$if($not(%totaltracks%=1),$imageabs2(120,120,0,0,120,120,210,1,$replace(%path%,%filename_ext%,\cover.jpg),))

The group display and artwork attached should not scroll out of view in the playlist.

thanks

foo_uie_single_column_playlist

Reply #1186
BelleAndZEK: This has been discussed before. When you load an mp3 while foobar is not running, foobar is launched with the active directory being that of the mp3 file instead of the main foobar directory. You will find this behavior common to any windows program linked with file associations. When you launch foobar from it's shortcut, it will run with the main foobar as the active directory (or whatever directory you spcified in the shortcut properties). The result is that when SCPL evaluates code like:

$imageabs2(100,100,,,,,10,10,images\image.png,)

it attempts to load x:\path\to\your\mp3\file\images\image.png instead of x:\your\foobar\directory\images\image.png. The quick fix is to change your code to load images explicitly from the foobar image directory like this:

$imageabs2(100,100,,,,,10,10,x:\your\foobar\directory\images\image.png,)

However trackinfomod has already implemented a nice fix for this situation and we are waiting for the changes to carry over to singlecolumnplaylist so that we can do code like this:

$imageabs2(100,100,,,,,10,10,/images\image.png,)

Where the initial forward slash is automatically resolved to the foobar directory.




ohh yeah, it totally makes sense. thanks!

foo_uie_single_column_playlist

Reply #1187
I'm using using resized album arts in my playlist and with about 400 albums in the playlist scrolling is very slow... maybe 1-2 redraws every second.
Has anybody tested which function is how time comsuming? e.g. imageabs vs. imageabs2 etc...

Below my config, maybe someone can tell me why it isn't the fastest.

Code: [Select]
//ITEM DISPLAY
//Cover+Frame
$drawrect($sub(%_width%,170),-1,20,19,brushColor-200-200-200)
$drawrect($sub(%_width%,151),-1,201,19,brushColor-240-240-240)
$puts(sizec,$min(192,$add($mul(%_itemcount%,17),37)))
$if($or($greater(%_itemindex%,9),$greater(%disc%,1)),,
$ifequal(%_itemindex%,$min(9,%_itemcount%),$drawrect(0,-1,$add(14,$get(sizec)),14,brushColor-200-200-200),$drawrect(0,-1,$add(14,$get(sizec)),19,brushColor-200-200-200))
$imageabs2($get(sizec),$get(sizec),0,$add(30,$mul(%_itemindex%,17)),,,7,0,$replace(%path%,%filename_ext%,folder.jpg),NOKEEPASPECT)
)

// Selection frame + Now Playing Frame
$if(%_selected%,$drawrect(210,1,$sub(%_width%,385),16,brushcolor-233-243-247 pencolor-203-233-246),)
$if(%isplaying%,$drawrect(245,10,$sub(%_width%,460),7,)$drawrect(245,10,$add(1,$div($mul($sub(%_width%,460),%_time_elapsed_seconds%),%length_seconds%)),7,brushcolor-25-150-25))

// Tracknumber
$alignabs(215,1,300,120,,)
$ifequal($left(%tracknumber%,1),0,$font(calibri,10,,200-200-200)0$font(,,,0-0-0)$right(%tracknumber%,1),$font(calibri,10,,0-0-0)%tracknumber%)

//Tracktitel
$alignabs(245,1,$sub(%_width%,450),20,,)
$if(%cwb_queueindex%,$font(,,bold glow-200-100-100,)'['%cwb_queueindex%']' ,)
$if(%isplaying%,$font(,,glow-100-200-100,0-90-0),$font(,,,0-0-0))
$replace($caps2(%title%),'(',$font(,,,114-116-120)'(',')',')'$if(%isplaying%,$font(,,glow-100-200-100,0-90-0),$font(,,,0-0-0)))

// RPGain+Length
$alignabs($sub(%_width%,145),1,120,20,,)
$if(%__replaygain_track_gain%,$font(Wingdings,10,bold,50-150-50)ü,$font(Wingdings,10,bold,150-50-50)û)
$alignabs($sub(%_width%,230),1,55,20,right,)$font(calibri,10,,0-0-0)
%length%

//Play Counter
$if(%play_counter%,,$puts(play_counter,0))
$alignabs($sub(%_width%,130),1,116,20,left,)
$ifgreater(%play_counter%,14,$font(Wingdings,10,bold glow-80-80-255,255-100-100)«,
$ifgreater(%play_counter%,9,$font(Wingdings,10,bold glow-255-100-100,255-255-80)«,
$ifgreater(%play_counter%,4,$font(Wingdings,10,bold glow-240-240-60,114-116-120)«,
$font(Wingdings,10,bold glow-200-200-200,255-255-255)«)))
$font(,,,114-116-120)
$repeat(«,$mod(%play_counter%,5))
$font(,,,230-230-230)
$repeat(«,$sub(4,$mod(%play_counter%,5)))


//Bitrate
$alignabs($sub(%_width%,120),1,116,20,right,)$font(calibri,10,,0-0-0)
$if2(%__bitrate_dynamic%,%__bitrate%)' Kbps'

Code: [Select]
//GROUP DISPLAY
$ifgreater(%disc%,1,
$drawrect($sub(%_width%,170),,220,51,brushColor-200-200-200)
$drawrect($sub(%_width%,169),-1,18,53,brushColor-200-200-200 penColor-NULL)
,
$puts(sizec,$min(192,$add($mul(%_itemcount%,17),37)))
$drawrect(0,0,%_width%,51,brushColor-200-200-200 penColor-0-0-0)
$drawrect(1,50,$add(12,$get(sizec)),2,brushColor-200-200-200 penColor-NULL)
$imageabs2($get(sizec),$get(sizec),0,-4,,,7,0,$replace(%path%,%filename_ext%,Folder.*),NOKEEPASPECT)

$drawrect($sub(%_width%,169),0,18,51,brushColor-200-200-200 penColor-NULL)
$font(calibri,24,bold glow-230-230-230,200-200-200)$alignabs($sub(%_width%,80),5,100,35,,)
$if2(%date%,)
$font(calibri,18,bold glow-0-0-0,200-200-200)$alignabs(210,0,600,28,,)
$if2(%artist%,'['ARTIST']')
$font(calibri,18,bold glow-255-255-255,255-150-150)$alignabs(250,20,600,28,,)
$if2(%album%,SINGLES)
)

//Disc Image
$if(%disc%,$imageabs($sub(%_width%,140),5,images\minidisc.png,)
$font(calibri,24,bold glow-255-255-255,0-0-0)$alignabs($sub(%_width%,120),15,100,35,,)
%disc%,)

and a Screenshot:

foo_uie_single_column_playlist

Reply #1188
updated. mostly just to bring over stuff from trackinfo_mod.

I'm using using resized album arts in my playlist and with about 400 albums in the playlist scrolling is very slow... maybe 1-2 redraws every second.
Has anybody tested which function is how time comsuming? e.g. imageabs vs. imageabs2 etc...


1) Set the clipping rectangle for your images properly in imageabs2
2) Try to remove the glow, shadow, and alpha and see if it helps.

foo_uie_single_column_playlist

Reply #1189
yay! I can now use the forward slash for image paths. Thanks again terrestrial for your dedication to these components.

foo_uie_single_column_playlist

Reply #1190
Question.

Row height is 32, and group rows is 1.

I'm showing the album art to the left of the track items, resized to 107x107 pixels.

If there are only 3 tracks per group, the album art will be clipped at the bottom, obviously. 4 tracks is fine.

Is there a way to put a certain amount of white space in between each group if there are less than 4 tracks?

This would be very helpful for those albums that have 2 or 3 very long tracks, but are still considered albums.

foo_uie_single_column_playlist

Reply #1191
adrosenth: This situation has been discussed several times already please read the earlier posts before posting. Many (including myself) have requested a minimum rows/minimum group height option. Until such a feature emerges you can have the cover art removed for groups not large enough to display full image like this:

Code: [Select]
$ifgreater($mul(%_height%,%_itemcount%),100,
// Your existing cover art code
,)

* Where the 100 on the top line is the minimum height in pixels needed to display your cover art

foo_uie_single_column_playlist

Reply #1192
I've tried searching, and can't come up with a definitive answer (although I've muddled through) - what exactly do blank or 0 values mean in an $imageabs2() function?  It's explained in the wiki for $imageabs(), but not abs2.

foo_uie_single_column_playlist

Reply #1193
Terrestrial, I'm having a problem that cropped up with the new version. Stretched images have a fade to the right or bottom, depending on which way its stretched. I know how to fix it, but I obviously don't have access to the code. Check your GDI+ graphics object and make sure that your quality and interpolation settings are correct.

foo_uie_single_column_playlist

Reply #1194
I read in the releasenotes that it was possible to use Columns UI Globals. How is this done? I've tried %globarvarname% and %_globarvarname% but I am only get a ? sign.


foo_uie_single_column_playlist

Reply #1196
Regarding globals...

I set a global in columns ui like so: $set_global("something",5)

but in scp I get unknown variable if doing this: $get_global("something")

What's wrong here?

foo_uie_single_column_playlist

Reply #1197
try using single quotes
elevatorladylevitateme

foo_uie_single_column_playlist

Reply #1198
if i have more than one SCPL open, how do i move tracks from one playlist to another?

foo_uie_single_column_playlist

Reply #1199
try using single quotes


I still get unknown variable in this case. I've also tried no quotes but haven't had better luck. Does $get_global work for others? Could someone paste some working examples?