Skip to main content
Topic: Library Tree Discussion (Read 29378 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Library Tree Discussion

Reply #175
Can I find information about support for the Spider Monkey Panel somewhere (for Library Tree and Biography scripts)?

I use JS Playlist and it's the best I found.
I only lose more than one grouping level (for multiple disk editions) and $rgb() tag support (in a grouping).
Otherwise, I'm happy with it.
(offtopic, but a crucial topic for me...)

Re: Library Tree Discussion

Reply #176
See here.

Since that post there have also been some new feature requests that need to be taken into consideration...

Re: Library Tree Discussion

Reply #177
New Version: Library Tree 2.0.0


NEW: Improved menu options (menu > options). Most key options are now on the menu, e.g. mouse & key actions, target playlists, themes, sub-item vs track counts, root node style, items to show and mode (e.g. remember tree state [expanded nodes]).

NEW: Touch Control (enable: menu > options > mode)***.

NEW: Nowplaying highlight option (enable: menu > options > show). If enabled, also adds "Show Nowplaying" to context menu.

NEW: Filter presets now support $nowplaying{%field%}, enabling filtering based on the nowplaying track, e.g.
         artist IS $nowplaying{%artist%} => tree displays tracks by nowplaying artist.
         Nowplaying views can be put in a second Library Tree panel, if required, to retain optimal access to normal views.

NEW: Invalid search expressions are now identified with a message.

CHG: Improved auto expand. Useful to auto expand search, filter & nowplaying results etc if below a certain size. Size is user-configurable. Enable & configure: menu > options > mode.

CHG: Keyboard Shortcuts: common are now inbuilt (see context menu). User configurable keyboard shortcuts have been moved to "ADV.Hot Key..." (panel properties).

CHG: Various performance enhancements, e.g. scrolling & initialisation of views (especially compared with v1.4.0.2 when first released).

CHG: Requires Spider Monkey Panel - if you're unfamiliar with it, then it's based on JScript Panel but has a modern Javascript engine. Spider Monkey Panel can be run alongside JScript Panel, & so other panels can continue to run in JScript Panel if you don't have Spider Monkey Panel versions.

*** for an extra scroll experience, if you don't have a touch screen, enable touch control and drag with left mouse button down.

Panel properties will be reset as its a new panel. Export JScript panel properties or back-up layouts before updating if you want a record. Importing JScript panel properties isn't supported: panel properties have been overhauled & many key options are now on the menu.

Re: Library Tree Discussion

Reply #178
Error: Spider Monkey Panel v1.1.4 (Library Tree v2.0.0 by WilB)
tt.Activate is not a function

File: <main>
Line: 1227, Column: 20

Stack trace:

Re: Library Tree Discussion

Reply #179
Thanks for the report.

Reproduced & fixed for the next version.

Until that time note that the issue only seems to occur after enabling menu > options > show > tooltip. Even then reloading the script will remove the error and display the tooltips.

Re: Library Tree Discussion

Reply #180
Error: Spider Monkey Panel v1.1.5 (Library Tree v2.0.0 by WilB)
assignment to undeclared variable image

File: <main>
Line: 350, Column: 233

Stack trace:

Re: Library Tree Discussion

Reply #181
New Version: Library Tree 2.0.1

FIX: Tooltip issue.
FIX: Variable declaration.

Thanks for reporting.

Re: Library Tree Discussion

Reply #182
Thank you very much for your hard work. After updating, everything works like a charm  ;D

Re: Library Tree Discussion

Reply #183
–°an wait on JScript Panel 2.2.0 ?

Re: Library Tree Discussion

Reply #184
There was an error during some operations  :(

Error: Spider Monkey Panel v1.1.5 (Library Tree v2.0.1 by WilB)
assignment to undeclared variable en

File: <main>
Line: 1820, Column: 102

Stack trace:

Re: Library Tree Discussion

Reply #185
New Version: Library Tree 2.0.2

@Tropoje. Thanks for reporting. The issue should be fixed.

@seriousstas. I fixed compatibility with JSP 2.2.0 (v1.4.0.3) a while ago - it doesn't have any of the new feature set though. It can be obtained from the usual location.

I believe you were the first to ask about adapting Library Tree to SMP. Porting to SMP resulted in a large number of changes and use of newer ES features that are incompatible with JSP. Back porting to JSP would therefore be a lot of effort - I don't have a direct JSP precursor to the SMP version since a bunch of new features were added during porting. I don't see the need for a JSP version either:
1) SMP can be run alongside JSP. So if you don't have SMP versions of other scripts they can continue to run in JSP.
2) A basic upgrade of JSP scripts to SMP versions in any event should only take a few minutes per script following the migration guide. Only if you wanted to use newer ES styles and features would it be more significant undertaking.
3) Moreover, I think you use "View by Folder Structure". This loads 1.5x faster when running in SMP (v1.1.6-beta) vs JSP (v2.2.0) on my machine [GetLibraryRelativePaths used for both].


Re: Library Tree Discussion

Reply #186
@AndreaT Thanks for the reports. I moved the feedback here, since Uploads section is not a proper place for discussion.

I am getting this error as I click on the top line All Music when in View by Folder Structure mode.
Error: Spider Monkey Panel v1.1.5 (Library Tree v2.0.2 by WilB)
too many arguments provided for a function call

It seems that the "apply" function has a hard coded argument limit of ~500000 in Spider Monkey Panel. So I presume you were trying to send 500000+ tracks from All Music which would give the error. I have changed the method in my copy & so it should be fixed for the next version.

Error: Spider Monkey Panel v1.1.5 (Library Tree v2.0.2 by WilB)
out of memory

I just checked on my system and library tree has a very low memory usage. With default theme, view by folder structure, searches and even expanding every node in the tree I couldn't get it to go above a very small 3-4MB. If one of the theme backgrounds is on then the image display can result in it becoming bigger as the images change. I saw it rise to 62MB, which is still low, before the automated Spider Monkey Panel GC (garbage collection) kinked in and reduced it back down.

To check the panel memory usage, in function on_playback_new_track (~line 2332) I put the following:

console.log("window.ID:", window.ID,"window.PanelMemoryUsage",window.PanelMemoryUsage/1000000, "MB :: Library Size",lib.list.Count);

So on playing a track the memory usage is reported in the console.

Memory handling in SMP is very different to JScript panel.
SMP restricts its total memory usage by default to AFAIK the smaller of 1 GB and 25% of RAM. Note that this is the memory available to all SMP panels. So its possible for one panel to get near the memory limit and effect what's available to other panels which in turn could give an OOM.

You can increase the memory allocation in preferences>advanced>spider monkey panel>maximum heap size. Don't change anything else. Maximum value AFAIK is 25% of RAM.

I do in fact wonder if the default wouldn't simply be better as always 25% of RAM.

Re: Library Tree Discussion

Reply #187
I do in fact wonder if the default wouldn't simply be better as always 25% of RAM.
Well, I don't want a music player to eat up 8gb of my memory :D
The memory limit is set mainly to prevent unintentional memory leaks (e.g. needlessly storing too many uncompressed art images in memory). 1gb limit should be enough for the majority of usage scenarios, IMO, and then there is a `maximum heap size` configuration options for special corner cases.

PS: @AndreaT , `out of memory` error also reports the name of the panel and the memory usage of that panel, so you can locate the memory eating culprit by finding the largest RAM usage number from those error reports.

Re: Library Tree Discussion

Reply #188
Hello WilB and TheQwertiest,
my archive has about 6200 directories and 600k records.

So, for the first problem, yes, probably the point what that. I take the opportunity to notify that the View by Folder Structure is "wrongly" reporting the number of records and not of folders (it does not mimic exactly the default Album List).

For the out of memery problem, I cannot replicate now because I already reverted back to Album List, but surely the total memory used by Foobar was not over 1.3GB because I was monitoring it with Windows resource manager. However I will try again the new release when available and I will take care to report any new crash or anomaly.

Going to the point "why willing to use the Library Tree instead of the default Album List, it is all related to these problems I have with Album List:
- my library is large and Album List integrated search is useless starving at any letter typed (this problem also is affecting Library Tree as I initially tested). I would like to have smart input allowing me first to type the patter in full and then run the search.
- Album List often gets stuck for 10-15 seconds and freezes the entire user interface.
- finally, I would like to have a more flexible search engine as Library Tree should be (not yet tested)

Thanks and regards,

Re: Library Tree Discussion

Reply #189
Thanks for the feedback.

Its actually very easy to delay the search. On line ~1835 the delay time is set to 160 (msec), and could be changed by Shift+RightClick>Configure and typing a different number, e.g. 250 to 2000 (0.25 to 2 seconds) or what works best. But I expect the default is about right for most users. I might consider adding an option to set the value in panel properties.

Regarding the number of records perhaps you're confusing sub-item counts that album list displays vs the number of tracks that library tree displays by default. If you right click on All Music in album list and open properties [ensure no search or filters are enabled], it should display the same number of items in the header bar that library tree displays next to All Music. No discrepancies have been reported: fb.GetLibraryItems provided by SMP/foobar2000 is used. It also uses the SMP/foobar2000 provided GetLibraryRelativePaths to prepare the list. I am aware that there can be minor differences in sort order with the folder structure view between the two, though.

Re: Library Tree Discussion

Reply #190
A basic upgrade of JSP scripts to SMP versions in any event should only take a few minutes per script following the migration guide
I use window.NotifyOthers to control the library with the buttons (CarPC) - now there is no time for changes..,
staying on // @version "1.4.1 beta3" )

SimplePortal 1.0.0 RC1 © 2008-2019