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

Re: Library Tree Discussion

Reply #25
This is a very nice component and compared to the other Library Tree component it offers more options and flexibility. However with large libraries (100.000+) it isn't really that lightweight. Yes it browses really fast but it takes over 4 sec to repopulate which freezes the entire foobar. This can make foobar sometimes "hang" for 3 times with each song (at the start/end of a song, in the middle when the play count is updatet and when I rate a song).
Setting Node: Show Tracks to false doesn't make a difference. It also increases ram usage on foobar significantly by about 15% and with each repopulation it spikes the cpu to 90%-100% for a short moment.
I'm running this library tree component next to the old library tree component for comparison with very similar query patterns (a bit confusing to use the same name of an older and very similar component). The older component doesn't exhibit this hanging behavior.

Re: Library Tree Discussion

Reply #26
I tested on ~28,000 library. Most views for me up date in 0.2 - 0.25 seconds. DUI album list is a bit faster on my system, taking about 2/3 the time, but not a huge difference. CPU usage with JScript Library Tree only rises slightly and briefly for me to 4% on repopulation. The script doesn't use the on_playback_new_track or on_playback_stop callbacks etc & so shouldn't do anything when a track starts or ends. Indeed in tests I couldn't see any issues on start/end. Playback statistics doesn’t normally update then either. May be you are auto-modifying track tags at start/end or something similar that provides the repopulation trigger. I tried repopulating multiple times, but I couldn't see any sustained increase in RAM usage. The script is coded to free memory of unwanted items. But I would confirm that JScript Library Tree does use some RAM, up to ~ 40 MB on my set up, which is trivial compared to the xx GB available on my system.

In contrast, when I used to use Ssenna's foo_uie_library tree albeit on XP I had many more problems with 100% cpu usage on start up for ~30 secs or longer as it was compiling queries. If you find foo_uie_library tree suits your workflow better then continue using that.

I believe JScript panel runs most stuff in the main thread. It is possible to make a small adjustment to the code in JScript Library Tree to stop it repopulating when playback statistics update part-way through a track or in response to any changes to existing library items (e.g. shift + right click > options > configure, then comment out line 1138 by putting // at start of line), such that it just populates on start up. Other than that, I don't think I can do anything to significantly change the behaviour.

HTH

Re: Library Tree Discussion

Reply #27
It is to be expected that with very large libraries loading (repopulating) would get slow. The older library tree component reacts in a similar fashion if I were to make patterns which searches the entire library so I avoid that. This seems to be handled somewhat differently with your component. Let me illustrate with an example.
When using no filter:

%genre%|%album%|%title%
on the old Library tree this will load the entire library making in very slow and almost unusable which is the same with the new library tree.
This however:

%genre%|%album%

On the old component this will not load the entire library. It only sees the album title as one single entry while the new library tree will still seem to take into account all %title% tracks belonging to the album even if it's not asked since reaction time is exactly the same whether I use %genre%|%album% or %genre%|%album%|%title%.
It's only when I define a filter (across all used filters) narrow enough so that it doesn't load too many files that it's workable.

Re: Library Tree Discussion

Reply #28
Is there a way to get rid of the "options" dialog that appears with the right click
and go directly to the subsequent  one where one can choose a showing pattern?

Thanks.

Re: Library Tree Discussion

Reply #29
Is there some way to adjust the Item Counter to count (immediate)nodes within branch instead of total items? (like default library)
Code: [Select]
+ACDC (3)
+Album1 (11)
+Album2 (11)
+Album3 (11)

Currently it reports
Code: [Select]
+ACDC (33)
+Album1 (11)
+Album2 (11)
+Album3 (11)

Btw branching within $if() and similar expressions seems to be broken, while that is allowed in the default library view.
For ex:
Code: [Select]
$if(%artist%,%artist%|%genre%, %genre%)
Is not being executed properly.

Re: Library Tree Discussion

Reply #30
I ran into a fatal bug with the non-configurable "View Folder Structure" option, causing FB2K to lockup hard.

Given the following folder structure:
Code: [Select]
topfolder
    +artistfolder
        +<loads of media files>
        +album folder
              +<loads of media files>
        +album folder
              +<loads of media files>
        +album folder
              +<loads of media files>
If there's folders with this layout, Library Tree refuses to fold these open. and won't go deeper than the artist folder.
The only way it will open the branch to show the sub folders is by moving all of the separate media files within the Artist folder to a subfolder on the same level as the albums.

But, if I do this with FB2K still running, (folder not active or selected in Library Tree), then FB2K will lock up hard and max out CPU usage.

Since this is a situation that exists throughout my library, I've discontinued the use and reverted back to the original album list, (also because I am missing both the subcount on sublevels and the conditional branching...)

EDIT: Further experimenting reveals this is related to the setting "Node: Show Tracks" which I have turned off by default exactly because of the library structure and because items should show in list views and not in tree views

PS. In case of wondering why going back to the original Album list, well the main reason is that it allows conditional branching and because of this I can recreate the folder structure browsing exactly as wanted, (i.e. showing just folders and no tracks, but sadly without the subcount on the lowest level)

Re: Library Tree Discussion

Reply #31
New Version: Library Tree 0.8

CHANGELOG

Improved right click action

Added option in panel properties to set library sync method:
   Auto > full automatic syncing with media library as before [default].
   Initialisation only > syncs with media library on start up & changing library view [manual refresh becomes available]).

Some efficiency improvements to tree population (mostly ~10-20%) and also to the handling of library changes.

Some functionality improvement when show tracks is disabled in edge case scenarios.

Some other points have already been answered in this thread or the accompanying uploads thread.

Library Tree 0.8

Re: Library Tree Discussion

Reply #32
WilB, thank you for the wonderful and powerful script.

Is it foo_jscript_panel core problem/limitation as in UTF-8 (without BOM) encoded cue-files a have something like this:
Quote
Blood Axis & Les Joyaux de la Princesse — Absinthine (D'AprГЁs Emile Duhem)    
and correct encoding i can get only by using UTF-8-BOM
Quote
Blood Axis & Les Joyaux de la Princesse — Absinthine (D'Après Emile Duhem)    

P.S. by default i use UTF-8 (without BOM) and Notepad++ editor

Re: Library Tree Discussion

Reply #33
Does this support if statements so I can stop Various Artists discs from being sorted by date?  With the old Playlist Organizer tree view plugin I was using this command.

Code: [Select]
%genre%|$if($strcmp(%album artist%,'Various Artists'),[%album artist% ]|['' ]%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
,%album artist%|%date% - %album%|[%discnumber%.][%tracknumber%. ][%track artist% - ]%title%)

Re: Library Tree Discussion

Reply #34
xiaNaix, i think you cannot use level separation inside $if-statements

You should do something like this:
Code: [Select]
%genre%|[%album artist% ]|$if($strcmp(%album artist%,'Various Artists'),%album%,%date% - %album%)|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%

or check %album artist% state on each level

Re: Library Tree Discussion

Reply #35
xiaNaix, i think you cannot use level separation inside $if-statements

You should do something like this:
Code: [Select]
%genre%|[%album artist% ]|$if($strcmp(%album artist%,'Various Artists'),%album%,%date% - %album%)|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%

or check %album artist% state on each level

Thanks!

Re: Library Tree Discussion

Reply #36
Hi WilB,

A few days ago, I have created a thread about your script: https://hydrogenaud.io/index.php/topic,111807.0.html
I really think your script is pretty great and very beautiful in comparison with album list panel but for my personal use it has some weaknesses.
As I said, I like to use filters playlist or album list panel playlist as a queue, unfortunately I can't do that with your script because it re-organizes the playlist in alphabetical order every time I add another track or album.
Also, I can't change the double-click action to add to current playlist (like album list panel) or add to active playlist (like filters), so it forces me to use Legacy Commands.
If you could only add options to by pass this auto sort in alphabetical order behavior and change the double-click action, your script would be GOAT.

Do you think you could make that kind of upgrade?

Re: Library Tree Discussion

Reply #37
New Version: Library Tree 0.9

CHANGELOG

ADD: option to panel properties to disable use of the default playlist (Library View) as the target for left and/or middle mouse button actions. When disabled the current playlist is used instead. When configuring, ensure the comma "," separators are retained.

FIX: corrected the behaviour of the context menu "Send to Current Playlist" and "Add to Current Playlist" actions.

@Qwghlm As far as I am aware the available JScript panel methods for getting and evaluating the library and then drawing the text do not have options for checking or setting the encoding. It is possible to detect and set the codepage in JScript panel when it reads text files from disc, but that's not what's happening here since foobar2000 is reading the files into the library, and the JScript panel is obtaining the library info from foobar2000.

@Axioma1. I have made a few adjustments. Either alt + left button click, mouse middle click or the context menu can be used to add tracks to the playlist without sorting. For the mouse actions the target playlist can be set as above as either the default library view or the current playlist. Adding tracks with control + left button click retains the sorting ability. I am reluctant to add the double click action "add to current playlist", since the single click actions occur first, which can result in unexpected behaviour. So in my view it's better to map the action to a different mouse button or use a key modifier on the single left button click as implemented.

HTH

Library Tree 0.9

Re: Library Tree Discussion

Reply #38
Nice! Thank you!

Re: Library Tree Discussion

Reply #39
@WilB This is probably one of the most beautiful looking library tree view scripts I've seen so far. It's flawless for me except one thing that is bugging me. The playlist sorting on folder structure view. It's currently using foobar's default %path_sort% setting. Other plugins are linked directly to foobars default %path_sort% setting, but it seems like you hardcoded it into the script somewhere. I'd like to change it to %artist% - %date% - %path_sort% if possible. Having it set like this sorts my playlist view by artist > album date.

Re: Library Tree Discussion

Reply #40
I use the View by Folder Structure
How can I see only the folders adding for such? :



Re: Library Tree Discussion

Reply #41
Hi WilB,

I agree with eddy_stylez, this is probably the most beautiful library tree, thank you for all your work.
I just have a slight request for you, do you think you could easily add another option in the context menu? I think an "Insert to playlist" or "Insert into current playlist" option would make the script even better.
Personally, I have huge EsPlaylists I do organize them by genre or by taste and I lost a lot of time because JScript Panel doesn’t allow drag & drop. I'm probably not the only who has this little issue.

Re: Library Tree Discussion

Reply #42
New Version: Library Tree 1.0

CHANGELOG

Added "Playlist: Custom Sort" option to panel properties. If left blank tracks are sent to playlists in the tree order (as before). If an entry is present (use titleformatting), tracks are sent to playlists according to the specified sort order. Example sort: %album artist%|%date%|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%. Some playlist viewers such as EsPlaylist have options to force-sort playlists which will override the send order

Added "Insert in Current Playlist" to context menu. If a playlist item has focus tracks are inserted before the item

@seriousstas
Like DUI album list, common folders are not displayed. The library tree folder view should display the same as DUI album list

Library Tree 1.0

Re: Library Tree Discussion

Reply #43
@WilB

Thank you for delivering to us the best jscript panel ever imho, still updated thru 1.0, keep the good work  ;)

Re: Library Tree Discussion

Reply #44
^ Thanks for the compliments...

New Version: Library Tree 1.1

CHANGELOG

Fixed a draw issue in folder view

Library Tree 1.1

Re: Library Tree Discussion

Reply #45
When there is a text in the search bar, select the text and then paste new text. The result is that there are more than one text in the search bar. Can you fix it? Replace old text with new text.

Re: Library Tree Discussion

Reply #46
Add please zoom (or resizing) for Node. Convenient for the touch - panels. Thank you! :


Re: Library Tree Discussion

Reply #47
Hey @WilB! Thanks for the great script, have been using it from the first release =)

One suggestion though, could you add autofill toggle? I.e. with autofill enabled(current behaviour) when you click on the element it automatically fills the playlist, when autofill is disabled playlist will be filled only on left double-click.
I've made a dirty fix for myself, but I think this feature be useful to other user as well.

The code responsible for autofill is here -
populate.lbtn_dn:
Code: [Select]
     if (v.k(2)) 
          this.load(item.item, true, true, false, false, alt_lbtn_pl, false);
     else
          if (v.k(1)) this.load(item.item, true, true, false, true, lbtn_pl, false);
     else
          if (v.k(0)) this.load(this.sel_items, true, false, false, true, lbtn_pl, false);
     else
          this.load(item.item, true, false, false, true, lbtn_pl, false);
To remove autofill and add double-click fill you have to put this code to populate.lbtn_dblclk after check_ix if block.

Re: Library Tree Discussion

Reply #48
I have dealt with most issues raised here and in the associated uploads thread. However, there are a couple of outstanding points before I wish to release a new version:

@seriosstas: Add to Current Playlist  - add always just in  "Library view". I can't reproduce this. The menu item "Add to Current Playlist" added to the current playlist as expected. MiddleBtn click & alt + left button click also worked as expected. Panel properties has "Playlist Use..." where you can set whether the button actions use the current or library view playlist. If this doesn't solve your issue then please post precise instructions on how to reproduce. Please also ensure you're using the latest release

@TheQwertiest: The left button single click seems to work the same way as DUI album list; i.e. with both library tree & album list the playlist is populated on single click. I don't see the advantage of having to use an extra click (double click) to accomplish this, but maybe I am missing something... It would also mean that single click would do nothing upon clicking on a name unless set otherwise. Bear in mind that if single click was set to do something else, that action would also run on double click, which may lead to unwanted events. Anyway, for me to consider it further, please provide convincing arguments as to why you want the double click option, why single click isn't suitable, what benefit double click offers and if added whether you want any other actions also triggered, such as starting playback

Re: Library Tree Discussion

Reply #49
@WilB
HI !
I want to apologize in advance for my English.
But I will try to explain the problem. I hope that you will understand what I mean.

The problem appears when you select the folders by pressing Ctrl and left mouse click and deselect unnecessary folders that I have already been selected, and then ADD(insert) the selected folders to the playlist.
I made a little video on the test foobar in order that you could see and reproduce the problem.
In the video I show you how it works in your two scripts, the latest version 1.1 and 0.8 modified for my needs.
Video
(Select folders, deselect not needed folders then add to playlist.)
All of the selected folders remain in the array, and when deselected, not removed from the array, and in playlist added all that was previously selected.
Is it possible to remove a previously selected folders from the array when adding to playlist ?

For me, this is the only problem that prevents normal use of the script.
Everything else works perfectly.
Thank you so much for your work  ;) .

 
SimplePortal 1.0.0 RC1 © 2008-2018