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: Library Tree Discussion (Read 127929 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Library Tree Discussion

Reply #200
Fantastic panel addition Wilb!

Just wondering if there is a way to color within formatting, either via syntax or similar to the existing:

Quote
Color control: < >    Used to dim or highlight text, currently available in playlist and status bar. There are 3 dim and 3 highlight levels, accessible by repeating color control characters.    <dim> >highlight< >>extrahighlight<<

tough work, good luck.
A rose will bloom, it then will fade.

Re: Library Tree Discussion

Reply #201
@WilB
If there is an unused * .CUE in the folder with the tracks -
"Add to Current Playlist" from the menu works correctly. Removes this * .CUE .
But if use index hotkeys (PlaylistAdd,0,PlaylistInsert,0) - CUE duplicates files .
:::::::::::::::::::::::::::::::::::::
"They're likely to work best with playlist autofill off"
It helps ,  but sometimes duplicates are added to the list

Re: Library Tree Discussion

Reply #202
@seriousstass

JScript playlist. I'm satisfied with the playlist renderers I currently use + plus coding one in JScript is a huge amount of effort. So I have no plans to produce one.

CUE files. I may not fully understand what you mean. But, perhaps you need to sort your CUE file handling so only the original music tracks or CUE are monitored as part of the library, e.g. set "Media Library\File Types" in main foobar2000 preferences or use a filter. If you have both the original music files + CUE files as part of the library then, depending on the view, its not always obvious with tree viewers like Library Tree or DUI album list, that both are present since they can sort together. It's not until you add to a playlist that you may see there is more than one copy of tracks. Add to playlist wouldn't remove CUES, it would just add what's in the selected tree item. I do a lot of testing with m_TAGS which is another container format, and I haven't seen any problems.

I checked the shortcut key commands vs the menu commands and they all worked correctly for me. I also checked the code and they're obtaining the lists in the same way. Perhaps your issue is related to the CUE file handling discussed above. Of course you also have to be sure not to assign the same hot key to "Add" and "Insert", because then both events take place.

@mjm716.

The dim & highlight syntax isn't supported.

Re: Library Tree Discussion

Reply #203
@WilB
Thanks for the answer!
I understood ..
I use // @version "1.4.1 beta" - here autoFill does not disconnect ..? , hence the problem ..
When do you plan release 1.4.1?
Quote
JScript playlist. I'm satisfied with the playlist renderers I currently use
This is a very big breakthrough, a modern script! , but
intel core i7 i5 is needed for normal (touch) scrolling,
or put 4x acceleration, which is not very comfortable ..
+ sorting by folders structure - necessary . Header is not beautiful)
:::::::::::::::::::::::
Sometimes forget to remove the CUE - for separate tracks it is not needed,
and that's what I get in the playlist :
Spoiler (click to show/hide)
in the version
// @author "Wilb"
// @version "1.3.2"
or if  just add a folder with the CUE twice.
In version 1.4, CUE is removed, but sometimes the problem remains.

Re: Library Tree Discussion

Reply #204
All issues - resolved .

 

Re: Library Tree Discussion

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

@seriousstas
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 #206
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 #207
New Version: Library Tree 2.0.0

CHANGELOG

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.

Updating
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 #208
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:
  activate_tooltip@<main>:1227:20
  Populate/this.move@<main>:1688:47
  on_mouse_move@<main>:2327:156

Re: Library Tree Discussion

Reply #209
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 #210
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:
  getFbImg@<main>:350:233
  UserInterface/this.on_playback_new_track@<main>:358:121
  UserInterface/this.blurReset@<main>:353:101
  on_size@<main>:2338:73

Re: Library Tree Discussion

Reply #211
New Version: Library Tree 2.0.1

FIX: Tooltip issue.
FIX: Variable declaration.

Thanks for reporting.

Re: Library Tree Discussion

Reply #212
@WilB
Thank you very much for your hard work. Now everything works like a charm :)

Re: Library Tree Discussion

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

Re: Library Tree Discussion

Reply #214
Сan wait on JScript Panel 2.2.0 ?

Re: Library Tree Discussion

Reply #215
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:
  SearchLibrary/this.on_char@<main>:1820:102
  on_char@<main>:2311:91

Re: Library Tree Discussion

Reply #216
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 #217
Hello WilB,

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

File: <main>
Line: 1681, Column: 103

Stack trace:
  get_selection@<main>:1681:103
  Populate/this.lbtn_dn@<main>:1606:49
  on_mouse_lbtn_down@<main>:2323:188

Regards,
Andrea

Re: Library Tree Discussion

Reply #218
Hello WilB,

and I am getting also many "out of memory" errors ...

This is what pop-up as I run a search:

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

Re: Library Tree Discussion

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

Quote
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.

Quote
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 #220
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 #221
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,
Andrea

Re: Library Tree Discussion

Reply #222
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 #223
WilB
Quote
A basic upgrade of JSP scripts to SMP versions in any event should only take a few minutes per script following the migration guide
Thnx!!
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 #224
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
BADBADNOTGOOD & Little Dragon
BADBADNOTGOOD

To this:

BADBADNOTGOOD
BADBADNOTGOOD & Ghostface Killah
BADBADNOTGOOD & Little Dragon

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.