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 126560 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: Library Tree Discussion

Reply #25
Library Tree v0.1 is not the most recent. Check forum upload for latest,

Re: Library Tree Discussion

Reply #26
Ouch! Whoops! :D. You're right. Thank you. I don't know how come I ended up with that one!

I installed the new one (0.5) and this time no errors.

However... it doesn't show anything either :(. I did go into options and set it to use the "Process" playlist that you can see in my previous screenshot but it's still empty. I get the same behavior from the JS Smooth Browser too... hmm. Any clue why?

Re: Library Tree Discussion

Reply #27
Have you configured foobar to monitor your music folders?

File>Preferences>Media library

Re: Library Tree Discussion

Reply #28
Aaaaaaaaaaaaaaah :D. Nope. I did it now :D.

Finally I get it!!! I thought that it will show stuff in that panel BASED ON what playlist I set, but it was completely the opposite way hahaha. The playlist you set is the playlist where IT PUTS the selection.

You guys are awesome, thank you so much for the fast answers! :)

Re: Library Tree Discussion

Reply #29
New Version: Library Tree 0.6

Mouse double click action now offers choice of expand/collapse, play (default) or expand&play/collapse as requested by blaxima

Library Tree now reports if the media library is not configured or if nothing is found by search/filter

Various minor refinements

Library Tree 0.6

Re: Library Tree Discussion

Reply #30
New Version: Library Tree 0.6

Mouse double click action now offers choice of expand/collapse, play (default) or expand&play/collapse as requested by blaxima


Thank you very much, but this is not what I meant. I was hoping it would act the same way browsing on your computer would. If you double click on a folder it continues on to sub-folders until it gets to a file, then it opens the file you select/double click. As it is now, it just plays the first file right away while I make my way through the sub-folders trying to get to track 6.

I do appreciate the effort though

Re: Library Tree Discussion

Reply #31
New Version: Library Tree 0.7

Oh, I think I understand what you mean now. It seems a good idea and I have hopefully implemented it correctly.

CHANGELOG

Mouse double click action. Now offers choice of play (default) or explorer style (expand/collapse if branch else play)

Library Tree 0.7

Re: Library Tree Discussion

Reply #32
New Version: Library Tree 0.7

Oh, I think I understand what you mean now. It seems a good idea and I have hopefully implemented it correctly.

CHANGELOG

Mouse double click action. Now offers choice of play (default) or explorer style (expand/collapse if branch else play)

Library Tree 0.7

Yes! This is what I wanted and it seems to be working well

Thanks again

Re: Library Tree Discussion

Reply #33
Very nice to see such an active developer! :). Good job brother!

Re: Library Tree Discussion

Reply #34
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 #35
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 #36
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 #37
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 #38
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 #39
Ooooooh! Just found this day before April Fools :D Great alternative.

Got one small idea for a future release though. Just cosmetics but it makes for a more consistent feel IMO.
I love the Filter dropdown, in fact, I like it so much I'd love to have the view selection also in a dropdown next to it :)

Apart from running into the same 'wall' @Scrummble found, the only other things that would make me drop the Library Tree panel version completely is the Same .... (Artist/Song/Genre/Style/Etc) auto searches and the AutoPlaylist feature

Got one question though, is there an option I've overlooked that changes the way it does subcounts? I would personally prefer to see it count only the number of immediate entries of a subbranch instead of the total track count at the bottom of the current branch? The latter tends to be way off from the correct total since it also includes entries on playlists instead of just the playlist files (CUE, m-TAG), resulting in the same tracks getting counted more than once,
As example, suppose you have a 15track album with a cue sheet (for whatever reason, e.g. to separate hidden tracks from the main song) resulting in effective 18 tracks, possibly having an m-TAG  file pointing to the cue file for tag information, that will end up being counted as 15+18*2 = 51 tracks....apart from this, you lose the information of how many items there are on a particular sub level.

Re: Library Tree Discussion

Reply #40
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 #41
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 #42
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 #43
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 #44
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 #45
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 #46
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 #47
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 #48
Nice! Thank you!

Re: Library Tree Discussion

Reply #49
@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.