Help - Search - Members - Calendar
Full Version: foo_uie_single_column_playlist
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28
huythuy
[quote]Hakubo
CODE
$fileexists($replace(%path%,%filename_ext%,Folder.*))

hi, please help me to modify the function to check for the parent folder also.

I suppose it shoudl be like this
CODE
if (exist in this folder, cover, if(exist in parent folder, cover, nocover))


but i don't know how to check the parent folder.

thanks smile.gif
eejadx
There might another less ugly way to do what you want, but this string works:

CODE
$if($fileexists($replace(%path%,%filename_ext%,folder.*)),
    $replace(%path%,%filename_ext%,folder.*)
,
    $if($fileexists($replace(%path%,$directory(%path%)\%filename_ext%,folder.*)),
        $replace(%path%,$directory(%path%)\%filename_ext%,folder.*)
    )
)
wolfsong
Is there a way to force the album art to update without restarting?
eejadx
In the config window: type something, undo, press apply. biggrin.gif
lav-chan
Er. After having played around with the plug-in for a while, i've come up with another request (please correct me if this function already exists and i just don't see it).

Here's my issue: It doesn't appear to be possible to alter the entries the component inserts into the context menu. That is, i can't move or get rid of the 'Settings...' and 'Playlist' entries when i right-click in the play list. This really messes me up because i'm so used to the 'Remove' and 'Crop' items being there.

Is it at all possible that this could be configurable?


edit:
Oh, hey. Another thing. This one's pretty small though.

It took me ages to figure out how to get the component to ignore the aspect ratio when resizing images. Perhaps someone could add a mention of the 'NOKEEPASPECT' option (and any other such undocumented features) to the wiki. I don't really want to register for that one thing, you know. :x


Other than that, fantastic plug-in. I'd been waiting for something like this... i don't know, almost since Columns UI was invented. A while, anyway.
BelleAndZEK
ok.. anyone got their album covers to show when the directory name has a # in it?

hmmmm, it doesnt work blink.gif

Yotsuya
So I was playing around with album art alignment and since I could find no real documentation outside of the wiki about it I thought I'd post this:

IPB Image
CODE
// Album Art
$if($get(album_mode),$ifgreater($mul(%_height%,%_itemcount%),95,
$imageabs2(110,95,,$sub($mul(%_height%,%_itemindex%),$add(%_height%,3)),,%_height%,2,,images\emptycd.png,)
$imageabs2(110,85,,$sub($mul(%_height%,%_itemindex%),$add(%_height%,5)),,%_height%,-7,,$replace(%path%,%filename_ext%,$if2(%cdid%,[%artist% - ]$replace(%album%,?,,:,)).png),halign-r)
$imageabs2(110,85,,$sub($mul(%_height%,%_itemindex%),$add(%_height%,5)),,%_height%,-7,,$replace(%path%,%filename_ext%,$if2(%cdid%,[%artist% - ]$replace(%album%,?,,:,)).tif),halign-r)
$imageabs2(110,85,,$sub($mul(%_height%,%_itemindex%),$add(%_height%,5)),,%_height%,-7,,$replace(%path%,%filename_ext%,$if2(%cdid%,[%artist% - ]$replace(%album%,?,,:,)).gif),halign-r)
$imageabs2(110,85,,$sub($mul(%_height%,%_itemindex%),$add(%_height%,5)),,%_height%,-7,,$replace(%path%,%filename_ext%,$if2(%cdid%,[%artist% - ]$replace(%album%,?,,:,)).jpg),halign-r)
,),)


This basically displays a background image of an empty cd case, then resizes the album art to a height that will fit in the case and align it to the right of the case. This is somewhat useful as it will take full images like the first example and overlay on top of the case spine while normal images like the last example fit in the case as normal. Smaller images like cd singles in the center examples get pushed to the side.

I'd still like to be able to run some sort of calculation to figure out the size of the resized image and remove the empty case for cd singles, and there are some ugly results when using nonstandard sized images (like vertical full size cover scans) but hey.. this is an example of how to use that halign parameter if anyone is interested (there is also a valign parameter for vertical alignment).
skelly831
QUOTE(lav-chan @ Nov 29 2006, 01:36) *

Oh, hey. Another thing. This one's pretty small though.

It took me ages to figure out how to get the component to ignore the aspect ratio when resizing images. Perhaps someone could add a mention of the 'NOKEEPASPECT' option (and any other such undocumented features) to the wiki. I don't really want to register for that one thing, you know. :x

The NOKEEPASPECT option and other changes are mentioned in the .txt file that's included with the plugin. smile.gif
4nt1
couldnt you just wildcard it like this?

CODE
// Album Art
$if($get(album_mode),$ifgreater($mul(%_height%,%_itemcount%),95,
$imageabs2(110,95,,$sub($mul(%_height%,%_itemindex%),$add(%_height%,3)),,%_height%,2,,images\emptycd.png,)
$imageabs2(110,85,,$sub($mul(%_height%,%_itemindex%),$add(%_height%,5)),,%_height%,-7,,$replace(%path%,%filename_ext%,$if2(%cdid%,[%artist% - ]$replace(%album%,?,,:,)).*),halign-r)
,),)



Yotsuya
Does this component now support wildcards for imageabs2? Last I checked it didnt but that was a little while ago.

EDIT: So I gave it a try and it worked. Optimizing my code now thanks for the heads up smile.gif
2Pacalypse
Are buttons supported yet?

I would love to be able to have this:

$if($strcmp($right(%filename_ext%,3),mp4),
$button(700,0,0,0,0,0,images\arrow.png,images\arrow.png,VLC,),
)
BelleAndZEK
I was going to ask the same about $button()

it'd be nice to have for this plugin with more parameters than just the usual "play", "pause", etc..

nbv4
QUOTE(BelleAndZEK @ Nov 30 2006, 18:24) *

ok.. anyone got their album covers to show when the directory name has a # in it?

hmmmm, it doesnt work blink.gif

I'm having the exact same problem. My code works for every single album in my collection except for one, and that one has a '#' in it.
topdownjimmy
I'm finding that the SCP view isn't following the selected playlist. I have a columns playlist and an SCP playlist displayed, and clicking between playlists changes the view in the columns playlist but not in the SCP playlist. Does anybody else have this problem? It only started a few minutes ago but now I can't get it to stop.
fabiospark
QUOTE(topdownjimmy @ Dec 2 2006, 20:58) *

I'm finding that the SCP view isn't following the selected playlist. I have a columns playlist and an SCP playlist displayed, and clicking between playlists changes the view in the columns playlist but not in the SCP playlist. Does anybody else have this problem? It only started a few minutes ago but now I can't get it to stop.


Can you do some more tests, please?

Maybe the ability to have scp stay on a different playlist than the one selected in the columns UI has been implemented silently... (if it's even possible)

There are a lot peple waiting for that.

Thanks.
topdownjimmy
I added a second SCPL, and that one followed the playlist switcher selection. I moved my formatting strings over, removed the first one, and now I'm back to normal. Not sure what went wrong.

I can say that what seems to have triggered it was having both a playlist dropdown and a playlist switcher in my layout. As soon as I added the switcher, it stopped following either. And even after I then removed the playlist dropdown, it wouldn't follow the selection.
topdownjimmy
Thanks for this amazing plugin. I think a lot of people agree it really revolutionizes foobar. I never saw it coming!

A few feature requests:

* Sum of some tag in group. This could be useful for generating an average rating for an album -- e.g. $div($groupsum(%rating%),%_groupitemcount%)

(I know %_groupitemcount% isn't correct -- isn't there code for this?)

or for generating the number of "total plays" of an album -- $div($groupsum(%play_count%),%_groupitemcount%)


* Can %_isplaying% be used in Group Display? This way you could change the look of the header depending on whether something in the group is playing.


* Can buttons be made to work with foo_run?


Thanks again!
Protoss
Okay I just started playing with foobar again, iTunes was just too bloated for me. I've got it so it shows my album art, but for some reason, it seperates a lot of my albums, so they are not grouped.
Yotsuya
Protoss:

File> Preferences> General> "Sort incoming files by:"
-or-
Edit> Sort> Sort by...

You need to put %album% somewhere in your sort string.
terrestrial
QUOTE(BelleAndZEK @ Nov 30 2006, 20:24) *

ok.. anyone got their album covers to show when the directory name has a # in it?

hmmmm, it doesnt work blink.gif


nope, won't work with paths with a #.


QUOTE(topdownjimmy @ Dec 2 2006, 12:58) *

I'm finding that the SCP view isn't following the selected playlist. I have a columns playlist and an SCP playlist displayed, and clicking between playlists changes the view in the columns playlist but not in the SCP playlist. Does anybody else have this problem? It only started a few minutes ago but now I can't get it to stop.


right click / playlist / make sure "Active" is checked.
ViZioN
Hey guys!

I've got a few questions about the single column playlist plugin. Firstly is there any way to re-arrange items in your playlist, say my clicking and dragging? I've been unable to do it so far, maybe theres something i'm missing. Also is there any ETA even a rough one for when the refresh issue will be fixed.

I've attached a screenshot to show what I mean

IPB Image

The U2 song was playing before slow moves but once it changes song it does not highlight the new song unless the new song is off the top of the playlist, or below the bottom.

Thanks for the great plugin!

ViZioN
lav-chan
You can re-arrange the play list by holding the Alt key when you're dragging stuff.


I don't know about the highlighting thing, though, that doesn't happen to me. You have 'Cursor follows Playback' checked in the Playback menu, yeah?
ViZioN
QUOTE(lav-chan @ Dec 3 2006, 11:55) *

You can re-arrange the play list by holding the Alt key when you're dragging stuff.

I don't know about the highlighting thing, though, that doesn't happen to me. You have 'Cursor follows Playback' checked in the Playback menu, yeah?


Thanks for the reply!

The holding ALT key works a charm thanks a lot for that laugh.gif

I tried checking the cursor follows playback in the menu but it doesn't seem to have fixed the problem. I know it's a known issue with the plugin so I guess i'll just have to bear with it for now tongue.gif

ViZioN
Spirit_of_the_ocean
QUOTE(lav-chan @ Dec 3 2006, 11:55) *

You can re-arrange the play list by holding the Alt key when you're dragging stuff.

Wow I didn't know that, that is really cool smile.gif.
Maybe some day this will work without having to click ALT beer.gif

wub.gif Thanks terrestrial
Hakubo
QUOTE(terrestrial @ Dec 3 2006, 06:11) *

QUOTE(BelleAndZEK @ Nov 30 2006, 20:24) *

ok.. anyone got their album covers to show when the directory name has a # in it?

hmmmm, it doesnt work blink.gif


nope, won't work with paths with a #.
Is this "won't" as in "never/not planned" or "as of now"?
The $fileexists works correctly with paths with "#" in them. So instead of "no cover" image now I get no image at all.
Spirit_of_the_ocean
On question does !noheader! works in the new version?
And what for settings you have to use? Tipping just !noheader! in group display?
Suppress Header works also if you type manually 0 in group rows. But then it shows 1 in group row settings but there is no on playlist.
Nickoladze
Is it possible to show the same image twice using $imageabs2()? Whenever I try it, only one shows up.


Just to clarify, I'm using two $imageabs2() statements separately, and only the first works.
lav-chan
What do you mean 'the same image twice'? Something like this?

$imageabs2(15,13,,,,,15,3,C:\Program Files\foobar 0.9.4\images\hellosatan.png,)
$imageabs2(15,13,,,,,35,3,C:\Program Files\foobar 0.9.4\images\hellosatan.png,)


That works fine for me.


I have a question though. Did anybody ever figure out a good way to trim strings when they exceed a certain length? I saw some people discussing it way back on, like, page 28 or something, but it didn't do much for me.

The problem i'm running into is not necessarily getting it to trim, but rather getting it to trim more than once. I'm using this:

$ifgreater($calcwidth(%title%),$sub(%_width%,75),
$left(%title%,$sub($len(%title%),6))'...',
%title%)


And that works fine the first time. If i shrink the window to less than the title width, it chops off the last six characters. You run into a problem, of course, if you shrink the window any further than that, because the code is actually still checking to see if the length of the full title is less than the window width, not the length of the title minus whatever you chopped off it.

Is there any way to solve this currently?
shakey_snake
I use:
CODE
$ifgreater($calcwidth(%title%),$sub(%_width%,$get(position)),$cut(%title%,$sub($strchr(%title%,'['),2)),%title%)

where position is where the text is aligned to the left (depending on album art).
I store most version information in brackets in the filename such as [Live] or [Alternate Take]
you could just set up levels, or chop the filename in half and alternate which half is displayed with $mod().
eejadx
^
The problem with your string is that it does not consider the average character width of a string (e.g. double width characters like W vs narrow ones like I.)

Here is what I am using. It cuts the string at the almost end of the area and replaces it with an ellipsis.

CODE
$puts(string,%title%)
$puts(charWidth,$div($calcwidth($get(string)),$len($get(string))))
$puts(areaWidth,$div(%_width%,5))

$alignabs(50,0,$get(areaWidth),30,left,top)

$ifgreater($calcwidth($get(string)),$get(areaWidth),
$left($get(string),$sub($sub($len($get(string)),$div($sub($calcwidth($get(string)),$get(areaWidth)),$get(charWidth))),2))'...'
,
$get(string)
)
lav-chan
Ug. I guess that works, but it's real hacky. Especially if you have variables like whether or not the artist is prepended to the track (in the case of compilations for example), et cetera. I suppose that's as good as you can get without re-implementing the original trackinfo ellipsising code though. Or using a monospaced font. :shrug:


(Why did the original code have to be removed anyway?)
Nickoladze
QUOTE(lav-chan @ Dec 4 2006, 05:11) *

What do you mean 'the same image twice'? Something like this?

$imageabs2(15,13,,,,,15,3,C:\Program Files\foobar 0.9.4\images\hellosatan.png,)
$imageabs2(15,13,,,,,35,3,C:\Program Files\foobar 0.9.4\images\hellosatan.png,)


That works fine for me.


$imageabs2(%_width%,%_width%,0,$sub($div(%_width%,2),22),%_width%,%_width%,0,0,$replace(%path%,%filename_ext%,folder.jpg),)
$imageabs2(78,78,0,0,78,78,5,5,$replace(%path%,%filename_ext%,folder.jpg),)

doesnt work
TheDom
Until today I run with v0.8 of foobar but I discovered screenshots of this great plugin so I updated to v0.9.4.2

But I simply can't get this plugin to work. I installed v0.5.4 Beta of it and v0.1.3 Beta 7 of Columns UI but I can't find where I should be able to configure it. I read somewhere that this should be possible via Display -> Columns UI -> Playlist View but there is nothing.

IPB Image

I also installed the C++ library and on startup fb2k does not display any errors on the console.

Please help me! smile.gif
eejadx
Right-Click in SCP area -> Settings
TheDom
Thanks, I got it smile.gif
eejadx
QUOTE(lav-chan @ Dec 4 2006, 12:03) *
Ug. I guess that works, but it's real hacky. Especially if you have variables like whether or not the artist is prepended to the track (in the case of compilations for example), et cetera. I suppose that's as good as you can get without re-implementing the original trackinfo ellipsising code though. Or using a monospaced font. :shrug:

Setting the first variable value to "%artist% - %title%" (or whatever you want) should do the trick, no? I agree with you, it's a pretty harsh process to trim a string, but I can't think of another more straightforward yet accurate way to do that.

QUOTE
(Why did the original code have to be removed anyway?)

Request: is it possible to add some kind of ellipsising support for too long stings?
lav-chan
QUOTE(Nickoladze @ Dec 4 2006, 12:41) *
$imageabs2(%_width%,%_width%,0,$sub($div(%_width%,2),22),%_width%,%_width%,0,0,$replace(%path%,%filename_ext%,folder.jpg),)
$imageabs2(78,78,0,0,78,78,5,5,$replace(%path%,%filename_ext%,folder.jpg),)

doesnt work

I dunno, it works for me. Shows two copies of folder.jpg.


QUOTE(eejadx @ Dec 4 2006, 17:05) *
Setting the first variable value to "%artist% - %title%" (or whatever you want) should do the trick, no?

No, it wasn't quite that easy for me. First of all the artist doesn't always show up (only if it's a compilation or a single track), so i had to go back and create a variable to determine whether it should. Secondly the artist is formatted differently from the title, so i couldn't just add it to the one string ('cause otherwise they'd be formatted the same). So i had to add the variable to your code, and then go strip the artist back out of the string it displays at the end so it wouldn't show up twice.

QUOTE
Request: is it possible to add some kind of ellipsising support for too long stings?

signed
Nickoladze
QUOTE(lav-chan @ Dec 5 2006, 10:05) *

QUOTE(Nickoladze @ Dec 4 2006, 12:41) *
$imageabs2(%_width%,%_width%,0,$sub($div(%_width%,2),22),%_width%,%_width%,0,0,$replace(%path%,%filename_ext%,folder.jpg),)
$imageabs2(78,78,0,0,78,78,5,5,$replace(%path%,%filename_ext%,folder.jpg),)

doesnt work

I dunno, it works for me. Shows two copies of folder.jpg.


It's supposed to make the first one stretch to as wide as the panel is and use a chunk of the image as a background to the group header basically. I'm just getting 2 of the same sized images.
CepiPerez
Terrestrial:
I' having problems with keyboard shortcuts in the latest version.
When I change between layouts, shortcuts doesn't work, until I restart or minimize-maximize foobar.
san84
How to hide scroll bar? It's really annoys me.. And in last beta it's always on my screen mad.gif
ubi
I'm having the same problem as CepiPerez. For Example after switching to my lyrics display I'm not able to switch back to playlist display unless I restart foobar.
shakey_snake
QUOTE(Nickoladze @ Dec 5 2006, 21:44) *

QUOTE(lav-chan @ Dec 5 2006, 10:05) *

QUOTE(Nickoladze @ Dec 4 2006, 12:41) *
$imageabs2(%_width%,%_width%,0,$sub($div(%_width%,2),22),%_width%,%_width%,0,0,$replace(%path%,%filename_ext%,folder.jpg),)
$imageabs2(78,78,0,0,78,78,5,5,$replace(%path%,%filename_ext%,folder.jpg),)

doesnt work

I dunno, it works for me. Shows two copies of folder.jpg.


It's supposed to make the first one stretch to as wide as the panel is and use a chunk of the image as a background to the group header basically. I'm just getting 2 of the same sized images.

areaWidth & areaHeight: This only allows shrinking, it does not allow expanding the size of the image.
Infil
I'm having trouble using the ALT key to drag items. I'm using 0.3.2 beta. Is it because I have sorted elements in groups?

EDIT: I fixed it! I upgraded the component smile.gif
Nickoladze
QUOTE(shakey_snake @ Dec 6 2006, 06:53) *

QUOTE(Nickoladze @ Dec 5 2006, 21:44) *

QUOTE(lav-chan @ Dec 5 2006, 10:05) *

QUOTE(Nickoladze @ Dec 4 2006, 12:41) *
$imageabs2(%_width%,%_width%,0,$sub($div(%_width%,2),22),%_width%,%_width%,0,0,$replace(%path%,%filename_ext%,folder.jpg),)
$imageabs2(78,78,0,0,78,78,5,5,$replace(%path%,%filename_ext%,folder.jpg),)

doesnt work

I dunno, it works for me. Shows two copies of folder.jpg.


It's supposed to make the first one stretch to as wide as the panel is and use a chunk of the image as a background to the group header basically. I'm just getting 2 of the same sized images.

areaWidth & areaHeight: This only allows shrinking, it does not allow expanding the size of the image.


That's not what I' doing. Basically, no matter what size, I cannot have the same image used twice in this panel if the two instances of the image are set to different sizes.

And with the release I have, it stretches the image.
Purple Monkey
I think I've found a bug with adding to the playback queue.

If I enqueue a track in ColumnsUI or the defaultUI it will switch playback to the playlist where I enqueued the file.

However if I do the same thing in SCP it goes back to where it was before. Also while playing the enqueued item %_isplaying% returns 0 and %cwb_queue_end_playlist% returns an empty string.

It's kind of annoying as I use add to playback queue to gaplessly change playlists.
Yotsuya
I have discovered odd behavior with the alpha parameter of the $drawrect() function under SCPL. I wonder if anyone could tell me if i'm using it wrong or if I have encountered a bug.

Starting with this line of code I see a normal blue bar for the now playing item:
CODE
$if(%isplaying%,$drawrect($if($get(album_mode),115,0),0,0,0,brushcolor-10-36-106 pencolor-null),)
IPB Image

What I would like to do is make that blue bar semi-transparent so I try this, but I get a green semi-transparent bar instead of a blue one:
CODE
$if(%isplaying%,$drawrect($if($get(album_mode),115,0),0,0,0,brushcolor-10-36-106 pencolor-null alpha-64),)
IPB Image

I have tried using brushcolor-0-0-255, I have tried many other colors and many other alpha levels but every time I get a green bar instead of a blue one. I can't even get a red one. Any input would be appreciated.
CODE
$if(%isplaying%,$drawrect($if($get(album_mode),115,0),0,0,0,brushcolor-0-0-255 pencolor-null alpha-255),)
IPB Image

EDIT: It appears that alpha uses pencolor not brushcolor. By using code like this I was able to achieve the desired effect:
CODE
$if(%isplaying%,$drawrect($if($get(album_mode),115,0),0,0,0,brushcolor-10-36-106 pencolor-10-36-106 alpha-128),)
[IPB Image
I still don't know where the green came from.
saberrider
I'd also like to see ellipse support for alignabs. That shouldn't be too hard to implement I hope.
spex04
QUOTE(Yotsuya @ Dec 7 2006, 23:21) *

I have discovered odd behavior with the alpha parameter of the $drawrect() function under SCPL. I wonder if anyone could tell me if i'm using it wrong or if I have encountered a bug.

Starting with this line of code I see a normal blue bar for the now playing item:
CODE
$if(%isplaying%,$drawrect($if($get(album_mode),115,0),0,0,0,brushcolor-10-36-106 pencolor-null),)
IPB Image

What I would like to do is make that blue bar semi-transparent so I try this, but I get a green semi-transparent bar instead of a blue one:
CODE
$if(%isplaying%,$drawrect($if($get(album_mode),115,0),0,0,0,brushcolor-10-36-106 pencolor-null alpha-64),)
IPB Image

I have tried using brushcolor-0-0-255, I have tried many other colors and many other alpha levels but every time I get a green bar instead of a blue one. I can't even get a red one. Any input would be appreciated.
CODE
$if(%isplaying%,$drawrect($if($get(album_mode),115,0),0,0,0,brushcolor-0-0-255 pencolor-null alpha-255),)
IPB Image

EDIT: It appears that alpha uses pencolor not brushcolor. By using code like this I was able to achieve the desired effect:
CODE
$if(%isplaying%,$drawrect($if($get(album_mode),115,0),0,0,0,brushcolor-10-36-106 pencolor-10-36-106 alpha-128),)
[IPB Image
I still don't know where the green came from.


Yea I noticed this aswell. Try using it over an image and it will cause some weird effects (inverts & colour changes).. strange huh.gif
mazy
i think i wrote something about this quite some time ago (look up my $drawrect post). when using alpha, different (and sometimes not very logical or obvious) rules apply.

imho it would be nice to make some things more consistent, mostly colors and alpha stuff. like enable specifying color in foobar's format (inside 'square' characters), make color gray scale when using just one value (pencolor-50) and add alpha as 4th optional parameter (pencolor-100-0-0-200) etc.

what do you guys think?

edit: imho positioning stuff could use some polishing too. like what omitting a value does, what zero or negative value does, special constants, percentage values etc.

these are some issues which basically holds me back from extensively using these (single column playlist and this) components
Betse
I'm glad the simple selecting now works in this plugin. So i started using it.
I have two remarks about that selecting.
1. when you want to select more than you can see in your screen and move, while selecting, your cursor up and past the edge of the playlist window it doesn't scroll up. It doesn't behave like in other windows while selecting.
Could you implement that?
2. Moving with ALT isn't very intuitive. There are probably reasons why you didn't take over the normal selectin procedure like in the colums_ui playlist, but, maybe it's still possible to just move while keeping left mousebutton down.

I have a nice layout now smile.gif I'm happy, except for the selecting procedure.
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.