Skip to main content
Topic: Library Tree Discussion (Read 47991 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" )

Re: Library Tree Discussion

Reply #191
Hi WilB,

Not sure if this is an appropriate place to request features, but I'd love to see a couple of things be implemented, if possible.

The main feature I'd love to be added is some kind of auto-search similar to Quick Search Toolbar or Facets. Essentially automatically populating the playlist with matches as each character is input into the search box; emulating pressing the enter key after each character as it currently is.

Also, I'm unsure if this is working as intended, but could the handling of symbols, namely "&" when sorting be changed from working like this:

BADBADNOTGOOD & Ghostface Killah

To this:

BADBADNOTGOOD & Ghostface Killah

Using the word "and" in place of "&" here sorts as desired. It just seems be the non-alphanumeric symbols that sort this way.

I just now noticed something small and pretty inconsequential; when hitting the esc key while typing in the search box it adds a small backwards arrow symbol. It would be cool if hitting the esc key here would clear the search bar of text, similar to clicking the X to the left.

I would be extremely grateful if you could consider the things above, but regardless of whether you have the time or desire to implement them, I'd like to say a big thanks for making this panel. All the best.

Re: Library Tree Discussion

Reply #192
Thanks for the feedback. All requests implemented + sort issue fixed in my copy!

The new features should be in the next version.

Re: Library Tree Discussion

Reply #193
Seeing two consecutive bands (album artists) sent to play list even though I select only one.

I'm using v2.0.2 of the script and with the following selection pattern:

View by Band //$swapbranchprefix{%<band>%}|$if($stricmp($meta(band,0),various artists),,[$nodisplay{$sub(99999,%date%)}'('%date%') '])%album%$if(%discnumber%,|Disk %discnumber%,)[ '('%disctitle%')']|[%tracknumber% ][%track artist% - ]%title%

My tracks are tagged correctly and have artist, band and album artist tags containing only one artist

An example: In the library tree I see artist123 followed by artist124 and by artist125. If I select artist123 I get a playlist containing both  artist123 and artist124 but only one album from artist124 even if artist124 has several albums.

Re: Library Tree Discussion

Reply #194
I noticed that I wasn't using the latest foorbar core (1.4.3). After upgrading to 1.4.4b1 all is working correccly again. Curious.

Re: Library Tree Discussion

Reply #195
It could use %_view%, like the album list panel has, to generate different names of playlists based on current tree view.

Re: Library Tree Discussion

Reply #197
@Awesomeo. Please explain how %_view% is useful in a normal workflow scenario.

@nikosvault . Displaying playlists isn't supported. There is a dedicated component that can show playlists in a tree view called playlist organiser foo_plorg.

Re: Library Tree Discussion

Reply #198
1. That's one of the reasons I still stick to album list panel. %_view% sends music to different playlists depending on which filter I choose (by album, by artist, by whatever):
I don't know what else is there to explain, I find it useful on daily basis.

2. I do have another wish, this one is probably gonna seem even weirder to you. I love $nodisplay{sort} option, but I'd love to see something similar, like $evaluateonly{} - a handle to filter by a value, but not display it. Sounds dumb, I know, but it would be the best thing for me to differentiate between same name artists. I have my library synced with musicbrainz and all of it has musibcrainz ids included. I could use them in the filter, of course, but who wants to see 128-bit UUIDs? I'd rather have them evaluated only, so that in certain cases I would see two positions for same name artists and not have them mixed up.

Re: Library Tree Discussion

Reply #199
Thanks for the feedback.

1. I've added support for %view% for the next version.

2. I've adjusted $nodisplaysort{}, so it should do what I think you want in the next version; e.g.
%artist%$nodisplay{%musicbrainz_artistid%}|... should separate artists of the same name, provided they have different mbids.

I might make grouping CASE SENSITIVE for the next version. If anyone has an opinion one way or another please let me know.

SimplePortal 1.0.0 RC1 © 2008-2020