Skip to main content

Topic: WSH Panel Mod (Read 580077 times) previous topic - next topic

0 Members and 2 Guests are viewing this topic.
  • einstein
  • [*]
WSH Panel Mod
Reply #1250
@marc2003 / Falstaff

awesome Work you're doing! Just a quick question ... with how many items per playlist / playlists you're playing around?

I'm just asking regarding possible performance issues, i'm talking about dimensions of ~50 playlists, some of them having >100.000 items to manage and play in my example. What is the "loading time" of such playlists (vs. ELP / CSP / CPL / NGPL) and how behaves the rest of foobar ... still responsive?


  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1251
mine is fine but i only have 2000 tracks. 

and i think i've bitten off more than i can chew. i'm too stupid to make this work properly. 

i can select multiple items by clicking and dragging or using the ctrl key + click but i can't combine the 2 without strange things happening. i think i'll wait for falstaff to post his and pinch his code - if i can understand it. i don't think anything i make will ever be fit for release.

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1252
mine work with a ~40k items playlist, because i've coded it around performance too. it's quite a good result, perfs are quite good, but some optimization are still possible, that's why i'm still work on the engine.

how it works? i just construct the view to display from the playlist, so, the playlst can be 50 items or 50k items, it run the same  (globally)

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1253
updated version of preview 5: http://dl.dropbox.com/u/22801321/foo_uie_wsh_panel_mod.zip

Quote
ADD: Add "MovePlaylistSelection" and "RemovePlaylistSelection" to plman object.
ADD: Add "SetActivePlaylistContext" method to plman object.



  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1254
preview 6 now up.

Quote
v1.5.0 Preview 6
- CHG: "Item" property of "IFbMetadbHandleList" interface is writable now.
- ADD: Add four new methods("Insert", "InsertRange", "AddRange" and "RemoveRange") to "IFbMetadbHandleList" interface.

v1.5.0 Preview 5
- ADD: Add "InsertPlaylistItems" and "InsertPlaylistItemsFilter" to plman object.
- ADD: Add "MovePlaylistSelection" and "RemovePlaylistSelection" to plman object.
- ADD: Add "SetActivePlaylistContext" method to plman object.
- FIX: Fix a problem that "plman.GetPlaylistFocusItemIndex" doesn't exist.


thanks for all the new stuff T.P. i especially like plman.SetActivePlaylistContext() meaning i can use the edit menu in default UI. 

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1255
Thanx, but your .Zip doesn't have docs (interfaces.txt, ...), possible to add them please?

Thanx by advance

  • einstein
  • [*]
WSH Panel Mod
Reply #1256
Thanks Falstaff ... for taking the time regarding performance!

I hope i'll be able to understand and use the "final" code, looks very promising right now

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1257
Quote
v1.5.0 Preview 7
- FIX: Fix a problem that the callback "on_metadb_changed" never gets called.

v1.5.0 Preview 6
- CHG: "Item" property of "IFbMetadbHandleList" interface is writable now.
- ADD: Add four new methods("Insert", "InsertRange", "AddRange" and "RemoveRange") to "IFbMetadbHandleList" interface.
- CHG: Change callback prototype "on_item_focus_change()" to "on_item_focus_change(playlist, from, to)".
- FIX: Fix a problem that "plman.GetPlaylistFocusItemIndex" always returns 0.


http://dl.dropbox.com/u/22801321/foo_uie_wsh_panel_mod.zip << now contains docs

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1258
Thank you

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1259
...
thanks for all the new stuff T.P. i especially like plman.SetActivePlaylistContext() meaning i can use the edit menu in default UI. 


humm, are you sure it works for all ?

i've added it: plman.SetActivePlaylistContext();

but in DUI, panels like Album Art or Selection Properties stay empty on selection changed (where i call plman.SetActivePlaylistContext() !!!)
but right, Edit menu entries are now available and seem to get the right selection ...

could you check or tell me how you do if it works for you?

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1260
i think it was only meant as a fix for the edit menu. from the docs....

Quote
// [1.5.0 Preview 5] New:
    // WORKAROUND: In DUI, you cannot run playlist commands of edit menu because they are invalid.
    void SetActivePlaylistContext();


i still see the same issue with other panels not updating.

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1261
ok, thanx for the confirmation.

let's hope a fix is possible for other panels

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1262
can i ask how you're grouping tracks? are you looping through all the tracks in a playlist and then creating a new group whenever you detect a change in the title formatting?

@T.P can we get a callback to detect when "activate now playing" has been triggered from double clicking the status bar or the main menu.. although my script can detect the change of focus and highlight the right item, i can't get it to jump to the right place if it's out of view. thanks again for the new stuff. i've barely scratched the surface of what is possible so far.
  • Last Edit: 07 October, 2011, 05:29:49 PM by marc2003

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1263
can i ask how you're grouping tracks? are you looping through all the tracks in a playlist and then creating a new group whenever you detect a change in the title formatting?


i only test group key rupture, i don't loop through all the tracks, just the range to display. looping all the tracks is against performances

@T.P can we get a callback to detect when "activate now playing" has been triggered from double clicking the status bar or the main menu.. although my script can detect the change of focus and highlight the right item, i can't get it to jump to the right place if it's out of view. thanks again for the new stuff. i've barely scratched the surface of what is possible so far.


not only for double-click on status bar, just when "activate now playing" is invoked ... can be from menu View>Columns Playlist>Activate now playing

  • marc2003
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1264
i don't loop through all the tracks, just the range to display

this is what i do also. i quickly discovered you can't get title formatting all at once.

i think where i was stuck is how to detect whether or not to display a group header for the first displayed item.  but i think i have an idea... for the first displayed item, i need to check the previous item which is out of sight to see if the groping    grouping format is the same. if it is just display the item but if it's different, draw a header.
  • Last Edit: 07 October, 2011, 07:00:38 PM by marc2003

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1265
you got it

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1266
WSH Simple Playlist Viewer (v0.6.1) only works with pre-alpha version of WSH Panel Mod 1.5.0 (not public yet)

NB: works fine under CUI, may have some issues in DUI


not perfect yet, but i think it could be used as it is, or it could help people who try to write their own playlist script :



http://pastebin.com/w3LWMQPh

free font guifx v2 transports required for buttons and rating star
  • Last Edit: 08 October, 2011, 06:08:51 AM by Falstaff

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1267
@ T.P Wang

feature request about tooltip, could it be possible to add the possibility to set coords (x,y) where we want the tooltip will be displayed ? for now, the tooltip display is always indexed to the mouse pointer coords ?

i wish to display a tooltip on mouse hover on an item in my wsh playlist viewer, but i'd like to display it over the title text of the item (fixed coords)

I hope it's possible to do and i hope you'll add it on your ToDo list then

  • r0lZ
  • [*][*][*]
WSH Panel Mod
Reply #1268
I would like to retrieve the whole content of the active playlist in a IFbMetadbHandleList.  I know how to retrieve the currently selected items, but I haven't found how to retrieve the whole playlist.  Is it possible?  How?

(I would prefer a solution that works with WSH v1.4 stable.)

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1269
@r0lZ

not possible in v1.4.x versions, that's the main goal of the next version to come v1.5.0 (with playback Queue api)

  • r0lZ
  • [*][*][*]
WSH Panel Mod
Reply #1270
OK, thanks.  I'll wait then...

  • romka18
  • [*]
WSH Panel Mod
Reply #1271
Sorry, i`m a newbie in wsh coding, but i learning

i wrote some function:

Code: [Select]
function HomePage() {
  
   var icon_test;
   icon_test = gdi.CreateImage(60, 60);
   gp = icon_test.GetGraphics();
   gp.fillroundrect(1,1,58,58,3,3,RGB(0,0,0));
   icon_test.ReleaseGraphics(gp);
   CollectGarbage();
  
   var icon_test_h;
   icon_test_h = gdi.CreateImage(60, 60);
   gp = icon_test_h.GetGraphics();
   gp.fillroundrect(1,1,58,58,3,3,RGB(50,50,50));
   icon_test_h.ReleaseGraphics(gp);
   CollectGarbage();
  
   var icon_test_c;
   icon_test_h = gdi.CreateImage(60, 60);
   gp = icon_test_h.GetGraphics();
   gp.fillroundrect(1,1,58,58,3,3,RGB(150,150,150));
   icon_test_h.ReleaseGraphics(gp);
   CollectGarbage();
  
   hp_buttons_temp={
       b1:new btn_image(icon_test,icon_test_h,icon_test_c),
       b2:new btn_image(icon_test,icon_test_h,icon_test_c)
   }
  
   my_hp_buttons_temp=new Array(
       hp_buttons_temp.b1,
       hp_buttons_temp.b2
       )

   hp_buttons=[];
  
   for (var i in my_hp_buttons_temp ) {
   hp_buttons.push(my_hp_buttons_temp[i]);
   }
  
   return hp_buttons;

}

could anybody explain me, why in other function, like on_paint, i cant draw like "hp_buttons[0].regular" or "hp_buttons[0].hover"?
is there some way to put this image in function Button(x,y,function etc)?

and one more question: i need to run some script when some usb-drive or cd is inserted, have wsh any callback for it, or some way to create it?

  • romka18
  • [*]
WSH Panel Mod
Reply #1272
i previously asked about getting list of dsps through wsh. this list exists in configuration\core.cfg. how can i read or edit it?

  • Falstaff
  • [*][*][*][*][*]
WSH Panel Mod
Reply #1273
i dunno

  • T.P Wang
  • [*][*][*][*]
  • Developer
WSH Panel Mod
Reply #1274
News:
WSH Panel Mod v1.5.0 Beta 1 is now public and can be downloaded from here