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_ui_panels (Read 1317869 times) previous topic - next topic
0 Members and 12 Guests are viewing this topic.

foo_ui_panels

Reply #800
You say that puis are only visual stuff, thing is - our layouts are very dependent on the grouping/sort modes (thats why group by was previously included in SCPL no?); We'd use the sort mode name or index to change group headers (e.g. from album name to artist name when grouping changed) or even the whole SCP (when sorting by a track title rather than an album); if a user doesn't have these functioning sort modes then the layout doesn't change correctly and things stop working. If we don't bundle the sort modes with the pui then they'll go ahead and try and sort anyway - this produces different errors.

Two cases:
Say I include a button on my layout that sorts by rating then folder, groups by rating. 
A.) A user with this preset but with a different grouping/sort order will see a messed up playlist as either it groups wrong, the wrong group header text is displayed or the items appear in an order not consistent with the layout's design (for example including images in the item display requires strict ordering for the image to display correctly)
B.) A user without this preset will see nothing happen and not know why. Nor will they know how to correct the problem without the layout designer providing a tutorial. Something I don't see many people doing.

It's all about consistency; layouts inherently rely on playlist sorting/grouping to work correctly. When that sorting is not exactly the same things start getting messy. Group by code has always been in SCPL/puis until now, why remove it?

The best illustration would be for me to make a layout release and point you to the list of comments asking for help that would appear

foo_ui_panels

Reply #801
Standardized preset names and some standardized User Globals (userFontFace,userFontSize,coverPath,artistImgPath, etc.) would be (IMO) absolutely awesome, and make these new features incredibly effective.
Right now they kind of aren't.

I think what we're kinda starting to see (because everything is scripted) is a kind of tiered system of of layout creators, layout modder's and layout users.
This could be a good or bad thing depending on your perspective, but I think it's reality, since this does take a fair bit of work (although it's definitely worth it).

I think standardizing a few things (like some user globals and preset names) is going to help everybody.


(btw, if the "Sort by group" checkbox overrides the "Group by" box, maybe checking that should ghost out the group by button and/or edit box)
elevatorladylevitateme

foo_ui_panels

Reply #802
Terrestrial:

many thanks for clearing up all those outstanding questions - and all your work on this component!



Standardized preset names and some standardized User Globals (userFontFace,userFontSize,coverPath,artistImgPath, etc.) would be (IMO) absolutely awesome, and make these new features incredibly effective.
Right now they kind of aren't.

I think what we're kinda starting to see (because everything is scripted) is a kind of tiered system of of layout creators, layout modder's and layout users.
This could be a good or bad thing depending on your perspective, but I think it's reality, since this does take a fair bit of work (although it's definitely worth it).

I think standardizing a few things (like some user globals and preset names) is going to help everybody.


(btw, if the "Sort by group" checkbox overrides the "Group by" box, maybe checking that should ghost out the group by button and/or edit box)



Standardised preset and variable names is a great idea. Would you be prepared to post/start a thread putting up a set. Hopefully, then, those that want to can use the same names - without a huge debate on what they should be!

foo_ui_panels

Reply #803
2 quickie questions -

1.  Does $playlistname() have any arguments, or is it left empty and returns the active playlist?
2.  Can you explain the $sortidx() function in a little more detail with an example and usage...I'm lost on that one.

EDIT:  Ok, I got $sortidx().  It means if you have a sort criteria called 'bubblegum' for example, and it is in place '3' in a sorting PRESET, then $sortidx(bubblegum) returns '3'.
EDIT2:  $playlistname() has no arguments.  Placing something inside the () returns [UNKNOWN FUNCTION].

foo_ui_panels

Reply #804
Why won't a song that is playing after being added to the playback queue return a true for %_isplaying% ?

foo_ui_panels

Reply #805
Feature request:

I'd like to display some tiny pictures etc. on the tracks they relate to. No problem setting a pvar in SCP and picking it up in panels_ui to put a button/Track Display in the right place on top of the SCP, everything refreshes nicely, no flickering etc. BUT when the SCP screen is scrolled panels-ui doesn't know and the buttons/TD are in wrong place!

Any chance you could give us a variable in SCP or panel_UI, or is (as I fear) scrolling handled elsewhere and not visible to your component?

foo_ui_panels

Reply #806
Edit: nevermind

foo_ui_panels

Reply #807
Quote
Does anyone know why, ever since switching to Panels UI, my drag'n'dropped playlist items always move to the bottom of the playlist?

...
you can't. scpl doesn't really support drag and drop positioning yet.


I distinctly remember being able to do this in SCPL, I would drag a track or album from Windows Explorer into foobar and the items would be placed after the now selected songs. After enabling the ColumnsUI "drop at end of playlist" feature these songs started being dropped at the end. Now trying to turn off this feature doesn't work. Was it somehow disabled in a PUI update?

Is the Single Columns Playlist selector code included with the PUI? i.e. the bit that looks like this
Code: [Select]
$if($or($isgrouped(album),$isgrouped(folder),$isgrouped(artist)),
    $scplsetlayout(Album)
,
    $scplsetlayout(Single)
)

)

foo_ui_panels

Reply #808
Hi terrestrial,

The latest PanelsUI version removes my "Track Display" dockable panel every time I restart foobar.

Cheers..

foo_ui_panels

Reply #809
Quote
Does anyone know why, ever since switching to Panels UI, my drag'n'dropped playlist items always move to the bottom of the playlist?

...
you can't. scpl doesn't really support drag and drop positioning yet.


I distinctly remember being able to do this in SCPL, I would drag a track or album from Windows Explorer into foobar and the items would be placed after the now selected songs. After enabling the ColumnsUI "drop at end of playlist" feature these songs started being dropped at the end. Now trying to turn off this feature doesn't work. Was it somehow disabled in a PUI update?

Seems like this option never worked with SCPL since I never touched this checkbox (i.e. disabled) and my drag'n'dropped files always moved to the bottom of the playlist.

Another problem :
$playlistname() / %playlist_name% doesnt work as a sourting/grouping criteria code.
I want to do something like this in the "group by" box (shortened)
Code: [Select]
$if($strchr($playlistname(),'°'),!noheader!,%album%%discnumber%%disctitle%)

The problem is this condition never returns the TRUE statement

foo_ui_panels

Reply #810
Any chance of implementing subgrouping, Terrestrial?

 

foo_ui_panels

Reply #811
Has anyone managed to successfully use foo_run commands in their buttons? I've only seen one (irrelevant) mention of it in this thread (unless the HA search doesn't return proper results).

The foo_ui_panels configuration window only shows Run service in the drop down context form so I guessed at what the commands for the foo_run services would be. I tried 'Run service/Name' and 'Run/Name' in my buttons to no avail. So either I am doing something wrong or foo_ui_panels is not compatible with this component yet. In the CWB Hooks component, the New File Tagger displays each user created foo_run context entry, so I imagine it should be possible, no?

foo_ui_panels

Reply #812
Has anyone managed to successfully use foo_run commands in their buttons? I've only seen one (irrelevant) mention of it in this thread (unless the HA search doesn't return proper results).

The foo_ui_panels configuration window only shows Run service in the drop down context form so I guessed at what the commands for the foo_run services would be. I tried 'Run service/Name' and 'Run/Name' in my buttons to no avail. So either I am doing something wrong or foo_ui_panels is not compatible with this component yet. In the CWB Hooks component, the New File Tagger displays each user created foo_run context entry, so I imagine it should be possible, no?

works perfectly here. if my run command is artistimage i just put 'artistimage' in my button command and it works

foo_ui_panels

Reply #813
works perfectly here. if my run command is artistimage i just put 'artistimage' in my button command and it works


I see, it is just the name of user-created entry itself. Thanks for the help.

foo_ui_panels

Reply #814

Is there any button command that will force a refresh of SCPL? If there was, we could stack this with any other button that tries to update the layout.


If the playlist is active you can use the utils menu command to "Send to playlist..." and choose the same playlist name.

Not sure how to get it as a button command - there is a component which gives separate menu commands with the appropriate playlist name on them which you may be able to refer to as a button command.

Easy to get the playlist name:

%cwb_activelist% - active playlist name
%cwb_playinglist% - playing playlist name

EDIT

Foo_utils "Edit other/Send to playlist/1 - Browser" type commands are only accessible from the buttons customise menu (i.e. for the foobar buttons bar). They do not appear in the commands in the drop-down in the panels-ui.



How about a button with a SORT command to force a refresh of SCP. Note that terrestrial now says the SORT command is "kinda deprecated" (I guess because he has provided new sorting/grouping functionality). I have never used the SORT myself but will try it soon.

foo_ui_panels

Reply #815
using version 0.9.2
code is in a Track Display
Code: [Select]
$if(%isplaying%,
$ifequal(%playback_time_seconds%,1,$setpvar(title,%title%),)
,)

$getpvar(title)


i thought this would return the title of the last song that played to a second or more, but it just returns a ?
there is no other code in the Track Display
what am i doing wrong?

foo_ui_panels

Reply #816
using version 0.9.2
code is in a Track Display
Code: [Select]
$if(%isplaying%,
$ifequal(%playback_time_seconds%,1,$setpvar(title,%title%),)
,)

$getpvar(title)


i thought this would return the title of the last song that played to a second or more, but it just returns a ?
there is no other code in the Track Display
what am i doing wrong?

Try %_isplaying%

foo_ui_panels

Reply #817

using version 0.9.2
code is in a Track Display
Code: [Select]
$if(%isplaying%,
$ifequal(%playback_time_seconds%,1,$setpvar(title,%title%),)
,)

$getpvar(title)


i thought this would return the title of the last song that played to a second or more, but it just returns a ?
there is no other code in the Track Display
what am i doing wrong?

Try %_isplaying%


nope, still the same

foo_ui_panels

Reply #818
yeah, its something to do with codepages and unicode / utf8 conversion. it's crashing within scintialla, who's code I'm not familiar with so I'm not quite sure what's going on. I tried changing the codepage on my system to see if I could reproduce the crash but then vista refused to boot, which meant I had to reinstall :( does bringing up the scpl layout box ever cause a crash, or is it only the main panels ui settings dialog (the one with the formatting string).
Opening the SCPL setting dialog also crashes foobar. Again, if I change codepages it does not seem to crash. For the sake of experimentation here is the code I am currently using for the main panelsui config please let me know if there is a way I can code it to be more friendly with scintilla:
Code: [Select]
$drawrect(0,0,0,0,brushcolor-233-233-233 pencolor-null)

// Top Bar
$panel(Menu,Menu,0,0,250,20,)
$panel(Logo,Track Display,$sub(%_width%,55),0,55,20,)

// Top Panel
$puts(toppanel.numpanels,5)

$ifgreater($getpvar(toppanel.hide),0,
$button2($sub($div(%_width%,2),25),22,0,0,50,2,'$drawrect(0,0,0,0,brushcolor-0-0-0 pencolor-null)','$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:toppanel.hide:$ifgreater($getpvar(toppanel.hide),0,0,1),'TOOLTIP:Open Panel')
,
$drawrect($div(%_width%,3),160,1,5,brushcolor-0-0-0 pencolor-null)
$drawrect($sub(%_width%,$div(%_width%,3)),160,1,5,brushcolor-0-0-0 pencolor-null)

$button2($sub($div(%_width%,2),25),162,0,0,50,2,'$drawrect(0,0,0,0,brushcolor-0-0-0 pencolor-null)','$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:toppanel.hide:$ifgreater($getpvar(toppanel.hide),0,0,1),'TOOLTIP:Hide Panel')

$ifgreater($getpvar(toppanel.mode),0,
$button2(0,160,0,0,$div(%_width%,3),5,,'$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:toppanel.mode:$ifgreater($getpvar(toppanel.mode),1,$sub($getpvar(toppanel.mode),1),0),TOOLTIP:'Previous Panel')
,)

$ifgreater($getpvar(toppanel.mode),$sub($get(toppanel.numpanels),2),,
$button2($sub(%_width%,$div(%_width%,3)),160,0,0,$div(%_width%,3),5,,'$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:toppanel.mode:$ifgreater($getpvar(toppanel.mode),$sub($get(toppanel.numpanels),2),$sub($get(toppanel.numpanels),1),$add($getpvar(toppanel.mode),1)),TOOLTIP:'Next Panel')
)

$select($add($getpvar(toppanel.mode),1),
$panel(Now Playing,Track Display,5,20,$sub(%_width%,10),140,)
,
$panel(Albums,Album list,0,20,%_width%,140,)
,
$panel(Queue,Queue Manager,0,20,%_width%,140,)
,
$panel(Lyrics,Lyric Show,0,20,%_width%,140,)
,
$panel(Console,Console,0,20,%_width%,140,)
)
)

$puts(mainpanel.y,$add(20,$ifgreater($getpvar(toppanel.hide),0,5,145)))
$puts(mainpanel.height,$sub(%_height%,$add(50,$ifgreater($getpvar(toppanel.hide),0,5,145),$ifgreater($getpvar(bottompanel.hide),0,2,50))))

// Main Panel
$select($add($getpvar(mainpanel.mode),1),

$panel(Lists,Playlists Dropdown,0,$get(mainpanel.y),150,20,)
$panel(Order,Playback order,150,$get(mainpanel.y),120,20,)
$panel(Search,Quick Search Toolbar,270,$get(mainpanel.y),$sub(%_width%,320),20,)

$button2($sub(%_width%,42),$get(mainpanel.y),0,0,14,14,X,x,PVAR:SET:playlist.mode:0,)
$button2($sub(%_width%,28),$get(mainpanel.y),0,0,14,14,Y,y,PVAR:SET:playlist.mode:1,)
$button2($sub(%_width%,14),$get(mainpanel.y),0,0,14,14,Z,z,PVAR:SET:playlist.mode:2,)

$panel(Playlist,Single Column Playlist,0,$add($get(mainpanel.y),20),%_width%,$sub($get(mainpanel.height),20),)
,
$panel(ProjectM,ProjectM Visualisation,0,$get(mainpanel.y),%_width%,$get(mainpanel.height),)
,
$panel(Test,Track Display,0,$get(mainpanel.y),%_width%,$get(mainpanel.height),)
)


// Bottom Panel
$puts(bottompanel.y,$sub(%_height%,75))
$puts(bottompanel.height,45)
$puts(bottompanel.numpanels,3)

$puts(toolbox.icons,29)
$puts(toolbox.iconsize,34)
$puts(toolbox.max,$sub($mul($get(toolbox.icons),$get(toolbox.iconsize)),$ifgreater($sub(%_width%,50),0,$sub(%_width%,50),0)))
$puts(toolbox.step,$ifgreater($get(toolbox.max),$add($get(toolbox.offset),10),$add($get(toolbox.offset),10),$sub($get(toolbox.max),$get(toolbox.offset))))

$ifgreater($getpvar(bottompanel.hide),0,

$button2($sub($div(%_width%,2),25),$sub(%_height%,32),0,0,50,2,'$drawrect(0,0,0,0,brushcolor-0-0-0 pencolor-null)','$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:bottompanel.hide:$ifgreater($getpvar(bottompanel.hide),0,0,1),'TOOLTIP:Open Panel')
,
$drawrect($div(%_width%,3),$sub(%_height%,80),1,5,brushcolor-0-0-0 pencolor-null)
$drawrect($sub(%_width%,$div(%_width%,3)),$sub(%_height%,80),1,5,brushcolor-0-0-0 pencolor-null)

$button2($sub($div(%_width%,2),25),$sub(%_height%,79),0,0,50,2,'$drawrect(0,0,0,0,brushcolor-0-0-0 pencolor-null)','$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:bottompanel.hide:$ifgreater($getpvar(bottompanel.hide),0,0,1),'TOOLTIP:Hide Panel')

$ifgreater($getpvar(bottompanel.mode),0,
$button2(0,$sub(%_height%,80),0,0,$div(%_width%,3),5,,'$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:bottompanel.mode:$ifgreater($getpvar(bottompanel.mode),1,$sub($getpvar(bottompanel.mode),1),0),TOOLTIP:'Previous Panel')
,)

$ifgreater($getpvar(bottompanel.mode),$sub($get(bottompanel.numpanels),2),,
$button2($sub(%_width%,$div(%_width%,3)),$sub(%_height%,80),0,0,$div(%_width%,3),5,,'$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:bottompanel.mode:$ifgreater($getpvar(bottompanel.mode),$sub($get(bottompanel.numpanels),2),$sub($get(bottompanel.numpanels),1),$add($getpvar(bottompanel.mode),1)),TOOLTIP:'Next Panel')
)

$select($add($getpvar(bottompanel.mode),1),
$panel(Egoh,Egoh Spectrum analyser,5,$sub(%_height%,75),$sub(%_width%,10),45,)
,
// -- Toolbox Start -- //
$drawrect(7,$add($get(bottompanel.y),1),$sub(%_width%,14),$sub($get(bottompanel.height),1),brushcolor-null pencolor-0-0-0)
$drawrect(10,$add($get(bottompanel.y),3),$sub(%_width%,20),$sub($get(bottompanel.height),5),brushcolor-0-0-0 pencolor-null)
$button2(2,$add($get(bottompanel.y),13),0,0,20,20,'$imageabs2(20,20,,,,,,,/images\leokennis\prev.png,)','$imageabs2(20,20,,,,,,,/images\leokennis\prev_down.png,)',
PVAR:SET:toolbox.offset:$ifgreater($getpvar(toolbox.offset),0,$sub($getpvar(toolbox.offset),$get(toolbox.step)),0),)
$button2($sub(%_width%,22),$add($get(bottompanel.y),13),0,0,20,20,'$imageabs2(20,20,,,,,,,/images\leokennis\next.png,)','$imageabs2(20,20,,,,,,,/images\leokennis\next_down.png,)',
PVAR:SET:toolbox.offset:$ifgreater($getpvar(toolbox.offset),$sub($get(toolbox.max),1),$get(toolbox.max),$add($getpvar(toolbox.offset),$get(toolbox.step))),)

$panel(Toolbox,Track Display,25,$add($get(bottompanel.y),3),$sub(%_width%,50),$sub($get(bottompanel.height),5),)
// -- Toolbox End -- //
,
$drawrect(5,$get(bottompanel.y),$sub(%_width%,10),$get(bottompanel.height),brushcolor-null pencolor-0-0-0)
$panel(Track Info,Track Display,7,$sub(%_height%,73),$sub(%_width%,14),41,)
)
)

// Bottom Bar
$panel(Progress,Seekbar,0,$sub(%_height%,30),%_width%,14,)

$puts(offset.button.x,$sub(%_width%,0))
$puts(offset.button.y,$sub(%_height%,15))
$button2(32,$get(offset.button.y),0,0,14,14,T,t,'PVAR:SET:mainpanel.mode:2',TOOLTIP:Test)
$button2(2,$get(offset.button.y),0,0,14,14,'$imageabs2(14,14,,,,,,,/images\Yotsuya\button.playlist.png,)','$imageabs2(14,14,,,,,,,/images\Yotsuya\button.save.png,)','PVAR:SET:mainpanel.mode:0',TOOLTIP:Playlist)
$button2(16,$get(offset.button.y),0,0,14,14,'$imageabs2(14,14,,,,,,,/images\Yotsuya\button.vis.png,)','$imageabs2(14,14,,,,,,,/images\Yotsuya\button.save.png,)','PVAR:SET:mainpanel.mode:1',TOOLTIP:Visualization)

$puts(offset.button.x,$div(%_width%,2))
$puts(offset.button.y,$sub(%_height%,16))
$button($sub($get(offset.button.x),50),$get(offset.button.y),0,0,0,0,/images\Yotsuya\button.dark.left.prev.png,/images\Yotsuya\button.bright.left.prev.png,Previous,)
$button($sub($get(offset.button.x),25),$get(offset.button.y),0,0,0,0,/images\Yotsuya\button.dark.center.stop.png,/images\Yotsuya\button.bright.center.stop.png,Stop,)
$button($get(offset.button.x),$get(offset.button.y),0,0,0,0,/images\Yotsuya\button.dark.center.$if(%ispaused%,pause,play).png,/images\Yotsuya\button.bright.center.$if(%ispaused%,pause,play).png,Play or Pause,TOOLTIP:$if(%isplaying%,$if(%ispaused%,Resume,Pause),Play))
$button($add($get(offset.button.x),25),$get(offset.button.y),0,0,0,0,/images\Yotsuya\button.dark.right.next.png,/images\Yotsuya\button.bright.right.next.png,Next,)

$panel(Volume,Volume,$sub(%_width%,100),$sub(%_height%,16),100,16,)
the layout selector code is only evaluated when the playlist changes / or a new sorting/grouping is applied. ideally you shouldn't have to manually select a layout, but the layout should be automatically chosen based on the sorting/grouping pattern. with the new sort/group main menu with the new version you should be able to create a preset and button as a workaround though.
I would like the ability to manually switch layouts on the same playlist with a button. (i.e.: album vs. singles groupings on the same playlist). While this could be accomplished by switching sort/group patterns I think that switching layouts would offer much more flexibilty.  The mechanisms to accomplish this all appear to be there there if we could somehow force SCPL to refresh. I have read several other posts where users have requested the ability to force SCPL to refresh for various reasions. Would it be possible to add a button command to force the refresh? We could then stack this on any other button to accomplish various things. Maybe a way to hook into when pvars are set to trigger a refresh. The new layout code appears to be very powerful but if it is not re-evaluated when the variables change then it loses much of its potential functionality.

foo_ui_panels

Reply #819
gregory: Is this more in line with what you are looking for?
Code: [Select]
// PerSecond
$if(%isplaying%,
$ifgreater(%playback_time_seconds%,1,$setpvar(title,%title%),)
,)

$getpvar(title)

With your previous code, the pvar would only be set when playback time is equal to one second not if it is greater. Also, unless you place this under a // PerSecond header it will not be re-evaluated every second.

By The Way... this question lead me to stumble upon a solution for a long time problem. How to show a list of the last played songs even accross foobar restarts. Well give this a try, it should be fairly obvious how to expand it past 3 tracks:
Code: [Select]
// PerTrack
$if(%isplaying%,
$setpvar(lastplayed.3,$getpvar(lastplayed.2))
$setpvar(lastplayed.2,$getpvar(lastplayed.1))
$setpvar(lastplayed.1,[%album artist% - ]%title%)
,)

// PerSecond
$alignabs(0,0,%_width%,15,,)$if2($getpvar(lastplayed.1),No Track)
$alignabs(0,15,%_width%,15,,)$if2($getpvar(lastplayed.2),No Track)
$alignabs(0,30,%_width%,15,,)$if2($getpvar(lastplayed.3),No Track)

(With creative use of the above code it should be a simple matter to apply time limitations to what is considered a played track)

foo_ui_panels

Reply #820
I would like the ability to manually switch layouts on the same playlist with a button. (i.e.: album vs. singles groupings on the same playlist)....

I made a Sort/Group Criteria called "Singles" with "Group by sort" enabled and nothing in the code.
Then I made a Preset called "Singles" wich uses this criteria.
And a $button using "Singles" action.
That's how I can change between Albums and Singles on the same Playlist.
Is that what you are trying to do?

foo_ui_panels

Reply #821
CepiPerez: I played around and got that approach to work per terrestrials earlier suggestion, however I would like to be able to switch SCPL layouts not just sort/group by criteria.

BTW:: I'm having some fun making a playback history panel.

foo_ui_panels

Reply #822

I would like the ability to manually switch layouts on the same playlist with a button. (i.e.: album vs. singles groupings on the same playlist)....

I made a Sort/Group Criteria called "Singles" with "Group by sort" enabled and nothing in the code.
Then I made a Preset called "Singles" wich uses this criteria.
And a $button using "Singles" action.
That's how I can change between Albums and Singles on the same Playlist.
Is that what you are trying to do?


The problem with that is when you're distributing your PUI, it adds an extra 3 steps for the user to set that up for the buttons to work. It would be easier with a direct button command to just switch the playlist type.

foo_ui_panels

Reply #823
gregory: Is this more in line with what you are looking for?
Code: [Select]
// PerSecond
$if(%isplaying%,
$ifgreater(%playback_time_seconds%,1,$setpvar(title,%title%),)
,)

$getpvar(title)

With your previous code, the pvar would only be set when playback time is equal to one second not if it is greater. Also, unless you place this under a // PerSecond header it will not be re-evaluated every second.

By The Way... this question lead me to stumble upon a solution for a long time problem. How to show a list of the last played songs even accross foobar restarts. Well give this a try, it should be fairly obvious how to expand it past 3 tracks:
Code: [Select]
// PerTrack
$if(%isplaying%,
$setpvar(lastplayed.3,$getpvar(lastplayed.2))
$setpvar(lastplayed.2,$getpvar(lastplayed.1))
$setpvar(lastplayed.1,[%album artist% - ]%title%)
,)

// PerSecond
$alignabs(0,0,%_width%,15,,)$if2($getpvar(lastplayed.1),No Track)
$alignabs(0,15,%_width%,15,,)$if2($getpvar(lastplayed.2),No Track)
$alignabs(0,30,%_width%,15,,)$if2($getpvar(lastplayed.3),No Track)

(With creative use of the above code it should be a simple matter to apply time limitations to what is considered a played track)


yeah, actually that's exactly what i am trying to do, it's something i actually saw in another post
i just posted a stripped down version, trying to find out why the pvars wouldn't work

here is the full code that doesn't work, i'm gonna try it your way, thx for the help
Code: [Select]
// PerTrack

$if(%isplaying%,

$ifequal(%playback_time_seconds%,0,$setpvar(album art,$replace(%path%,%filename_ext%,folder.jpg)),)
$ifequal(%playback_time_seconds%,0,$setpvar(last played,%last_played%),)
$ifequal(%playback_time_seconds%,0,$setpvar(artist,%album artist%),)
$ifequal(%playback_time_seconds%,0,$setpvar(title,%title%),)

$ifequal(%playback_time_seconds%,0,$setpvar(album art 3,$getpvar(album art 2)) $setpvar(album art 2,$getpvar(album art)),)
$ifequal(%playback_time_seconds%,0,$setpvar(last played 3,$getpvar(last played 2)) $setpvar(last played 2,$getpvar(last played)),)
$ifequal(%playback_time_seconds%,0,$setpvar(artist 3,$getpvar(artist 2)) $setpvar(artist 2,$getpvar(artist)),)
$ifequal(%playback_time_seconds%,0,$setpvar(title 3,$getpvar(title 2)) $setpvar(title 2,$getpvar(title)),)

,)

$imageabs2(50,50,,,,,,,$getpvar(album art),)
$alignabs(50,,350,50,left,middle)
$font(gorilla milkshake,10,,192-192-128)
$if2($getpvar(last played),)
$char(10)
$if2($getpvar(artist) - $getpvar(title),)

$imageabs2(50,50,,,,,,60,$getpvar(album art 2),)
$alignabs(50,60,350,50,left,middle)
$if2($getpvar(last played 2),)
$char(10)
$if2($getpvar(artist 2) - $getpvar(title 2),)

$imageabs2(50,50,,,,,,120,$getpvar(album art 3),)
$alignabs(50,120,350,50,left,middle)
$if2($getpvar(last played 3),)
$char(10)
$if2($getpvar(artist 3) - $getpvar(title 3),)


turns out the code does almost  work, i was using an $if($isplaying,... to show two different groupings of panels, one if there was a song playing, and another if there was not one playing, this is what prevented the code from functioning
[/font]

foo_ui_panels

Reply #824
Where can I download version 0.8.1?