HydrogenAudio

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: Falstaff on 2016-01-02 18:47:40

Title: Library Tree Discussion
Post by: Falstaff on 2016-01-02 18:47:40
looks good, will give it a try asap  thanx for sharing

is it based on the thanhdat WSH script (http://fav.me/d682ptl) ? if yes, you should credits him somewhere, somehow ;-)
Title: Re: Library Tree Discussion
Post by: Falstaff on 2016-01-02 22:55:19
just tested, it's a very good panel, congratulations, nothing is missing from what i can see now

just one little thing but maybe it's me : mousewheel UP + CTRL zoom out, it should do the opposite no ?
Title: Re: Library Tree Discussion
Post by: samithaj on 2016-01-03 05:56:10
Nice git for the new year !!!
Everything working great so far
Love keyboard navigation and selection options 
Way better than Library tree component
One thing i miss from that would be the filtering options for views
but this is feels way smoother and i really needed to this non-transparent  background of foo_uie_library_tree to go away (most importantly  )
Title: Re: Library Tree Discussion
Post by: Marcus Vinicus on 2016-01-03 22:15:13
WilB,

Thanks for this, I've given it a test and I like it. I'll integrate it into my layout. 
Title: Re: Library Tree Discussion
Post by: asionwu on 2016-01-05 13:37:35
tks for sharing! very fast!

(http://i.imgur.com/Fcq9rI3.jpg)

if use Multi-value tag ,it will be like this.
Title: Re: Library Tree Discussion
Post by: fabiospark on 2016-01-08 20:42:45
Maybe it is not in the aim of this tool or maybe this is already there
and I didn't find it:

is there a way to "embed" some filtering in each view to automatically narrow
the "population" before applying that view?

(Something like the library tree component does)

Thanks.
Title: Re: Library Tree Discussion
Post by: Scrummble on 2016-01-12 02:44:08
Absolutely awesome script.
But here comes a small issue:
In the view settings, it seems to divide the string with "|" before it is calculated. It is good for avoiding bugs when the metadata contains the | character, indeed, but it also means that the depth of the tree cannot be variable.
In foo_uie_library_tree, I use scripts like this
Code: [Select]
%genre%\['['%content group%']'\]%<album artist>%[ '['%performer%']'][\'['%mediatype%']']\['['%date%']' ]%album%[\%edition%]
As some of my tracks do not have an content group or edition, it may cut the depth of the tree when needed. I think maybe your script can be enhanced this way.
Thanks for bringing us this awesome script, again.
Title: Re: Library Tree Discussion
Post by: samithaj on 2016-01-14 20:09:58
Thanks for the update !!
And I think it's better to to create the thread in other some other part of the forum rather than "Uploads"
since:
https://hydrogenaud.io/index.php/topic,63848.0.html?PHPSESSID=bj95dkaq029v7fiub2k1b6opf2
Quote
This forum is for uploading files only - everyone can attach files to their posts. Discussion should be kept separate and in another forum. Note that recent posts in this forum are not shown in the foobar2000 forum portal - this is on purpose.

someone could miss out on updates :)
Title: Re: Library Tree Discussion
Post by: fals33 on 2016-01-17 12:23:02
thanks for the update WilB.

an anoying issue to fix please ... when resizing the panel height, displayed area, including the scrollbar do not fit the panel height, there is a gape when panel Height is not exactly a multiple of the row height value ...

http://i.imgur.com/BkQSkV0.png

---
fals33 aka Br3tt aka Falstaff ... Falstaff account lost with the forum migration :'( and no one care
Title: Re: Library Tree Discussion
Post by: WilB on 2016-01-21 18:38:59
LIBRARY TREE

Library tree is a JScript media library viewer.

REQUIREMENT

JScript Panel. The version required and any requirement changes will be kept up to date in the latest download link location.

INSTALLATION

Add a JScript Panel to the layout in the usual way. Click the JScript panel (or right click and choose configure) to open the editor. Use the tools button to import the Library Tree script

FEATURES

Fast and lightweight script

Compatible with default user interface (DUI) & columns user interface (CUI).

Supports transparency (requires CUI & panel stack splitter or similar).

Customisable media library views. Use // to separate name & | to separate branches. Existing views can be edited or new ones added in panel properties.

Multi-value tag support. Use %<field>% syntax for fields to be split, e.g. %<genre>%.

Accurate filter & search: text and queries (e.g. artist HAS beatles). These give the same results as DUI album list filter. All give sorted results so that query sort operations are N/A. Search and filter can be hidden.

Filtering is done before the tree is populated, enabling the tree to comprise different sub-populations of the library. Filters also offer quick access to commonly used queries. Filters are customisable in panel properties. Use // to separate name from query. Existing filters can be edited or new ones added.

Search finds items in the populated tree.

Smooth scrolling.

Discrete scrollbar; can be resized / hidden. Mouse wheel: page or standard 3 line scrolling (page = default; change in panel properties).

Colours and fonts: set in foobar2000 preferences for DUI or CUI.

Font size: set with DUI or CUI list font. Or use mouse-over with CTRL + mouse wheel to zoom the font size (resets if UI list font size changed). Filter can be zoomed independently.

Extra custom colour options are in panel properties: presets for auto fade & blending of colours used by filter & lines plus ability to set all colours individually.

Customisable node symbols: windows themed or font symbol. Colour of custom nodes can be configured.

Keystroke "jump" search.

Arrow key navigation + ctrl & shift selection.

Mouse middle button > adds to playlist.

Full context menu on right click.

Panel properties has further options, e.g. display settings for  "All Music" node, item counts, alternating row stripes, tooltips, auto-collapse, margin, tree indent, autoplay, auto fit (autofit stops clipping of text in the bottom row).

Access panel properties by right click > options.

Always check near to the end of this thread for the latest download link.

(http://i.imgur.com/BKTnT9r.png)

Library Tree 0.3 (https://hydrogenaud.io/index.php/topic,110938.msg914837.html#new)
Title: Re: Library Tree Discussion
Post by: MrMonkey on 2016-01-22 13:49:15
I got this error after loading the script:
Code: [Select]
JScript Panel (Library Tree v0.3 by Wilb): Microsoft JScript runtime error:
'symb' is null or not an object
File: <main>
Line: 618, Col: 21
<source text only available at compile time>

I'm using foobar2000 1.3.9, Library Tree 0.3, JScript Panel 1.1.1 on Win 7 x64.  Columns UI is my interface.
Title: Re: Library Tree Discussion
Post by: Frame on 2016-01-22 20:41:29
Thank you for this library viewer. Best of the best. :3

I have 2 suggestions:
1. 'Drag and drop' feature. Maybe an option to switch between the current behavior and a 'classic' behavior: click or double click on folder title (genre/artist/album) for expand/collapse a tree, middle click or drag and drop - add to playlist. It's kinda difficult to click small 'collapse/expand' buttons. Also now it's impossible to create (I mean the easy way) complex playlists, when you add 5 albums and then decide to add a 6th album between 3rd and 4th. If drag and drop is impossible to implement, then just 'classic' behavior will be enough.
2. The second option for items counting.  It will be great if numbers in brackets can show correspondingly the number of sub-folders (artists) in genre folders, the number of albums in artist folders and the number of songs in album folders.
(https://i.imgur.com/TyuqG3V.png)
Title: Re: Library Tree Discussion
Post by: Coreda on 2016-01-22 22:21:33
Curious which component the Youtube Source context menu is from, seen in the screenshots. Does it search Youtube for the selected track?
Title: Re: Library Tree Discussion
Post by: marc2003 on 2016-01-22 22:29:53
I got this error after loading the script:

It looks like the script is using windows theming options but you're using windows classic??
Title: Re: Library Tree Discussion
Post by: MrMonkey on 2016-01-23 00:39:55
It looks like the script is using windows theming options but you're using windows classic??
Yup.  Hmmm... so I'll have to play with the script to remove the theming options. Thanks.
Title: Re: Library Tree Discussion
Post by: WilB on 2016-01-26 17:40:10
New Version: Library Tree 0.4

@ MrMonkey & Frame. Thanks for the feedback. Regarding item counts, I prefer these to sub-item counts.
@ Coreda. The YouTube source context menu item is from the foo_youtube plug-in (https://hydrogenaud.io/index.php/topic,104379.0.html)

CHANGELOG
- Removed dependence on windows theme options.
- Added double click expand and collapse.
- Corrected a few minor draw issues.

Library Tree  0.4 (https://hydrogenaud.io/index.php/topic,110938.msg915088.html#new)
Title: Re: Library Tree Discussion
Post by: widerock on 2016-01-26 19:00:13
Is it possible not to list the music files in library tree panel?
I usually play foobar on 'album'/'directory' base which means that I don't need to see the listed files.
I know that I don't see the files if I don't click the last (+). But, it would be great if there is an option.
Title: Re: Library Tree Discussion
Post by: Frame on 2016-01-26 19:20:28
WilB, thank you for the update. Unfortunately, it's impossible to use double click, because the playlist autofills every time I click on a folder/album/artist title. Or did I miss an option to disable the 'autofill' feature?
Title: Re: Library Tree Discussion
Post by: blaxima on 2016-01-27 05:47:44
Thank you for sharing.

Auto play on send works half way though. When using the context menu to send, the song will play but double clicking on a song will only send it to the playlist.
Title: Re: Library Tree Discussion
Post by: WilB on 2016-01-28 13:05:16
@ Widerock Added option to panel properties "Node: Show Tracks": true / false.

@ Frame The double click expand/collapse action works identically to dui and cui album list, i.e. these also auto-fill. To avoid auto-fill, expand/collapse by clicking the node. Either way, to achieve what I think you want, use middle-click to add items in the order you want (if the playlist already contains items, use left click for the first addition). Middle click action is enhanced in 0.5, so please update. Double click expand/collapse action now needs to be set in panel properties (see below).

@ Blaxima Added option to panel properties to configure DblClick Action: Expand/Collapse or Send&Play (default) to achieve what you want.

Library Tree 0.5 (https://hydrogenaud.io/index.php/topic,110938.msg915163.html#new)
Title: Re: Library Tree Discussion
Post by: widerock on 2016-01-28 13:48:21
@ Widerock Added option to panel properties "Node: Show Tracks": true / false.
Thank you for the implementation.
Title: Re: Library Tree Discussion
Post by: blaxima on 2016-01-28 14:12:02
@ Widerock Added option to panel properties "Node: Show Tracks": true / false.

@ Frame The double click expand/collapse action works identically to dui and cui album list, i.e. these also auto-fill. To avoid auto-fill, expand/collapse by clicking the node. Either way, to achieve what I think you want, use middle-click to add items in the order you want (if the playlist already contains items, use left click for the first addition). Middle click action is enhanced in 0.5, so please update. Double click expand/collapse action now needs to be set in panel properties (see below).

@ Blaxima Added option to panel properties to configure DblClick Action: Expand/Collapse or Send&Play (default) to achieve what you want.

Library Tree 0.5 (https://hydrogenaud.io/index.php/topic,110938.msg915163.html#new)


Thank you

Is is possible to have double click open directories and then send and play once it reaches a song rather than one or the other?

Title: Re: Library Tree Discussion
Post by: dreadroach on 2016-01-28 14:41:19
Is it possible to add drag & drop feature? I really miss that, so i'm stuck using standard albumlist.. but everything else is great, looks great and lots of options.
Title: Re: Library Tree Discussion
Post by: marc2003 on 2016-01-29 10:47:43
That's not possible due to limitations of the component. You can drag/drop in to it but not out.
Title: Re: Library Tree Discussion
Post by: Axonn on 2016-01-29 16:23:24
Hey :). Do you guys have a clue why I have this issue when using Library Tree? I have latest version of everything (installed everything today). Only thing I changed is to do some customization in my Foobar columns in the playlist.

I attached an image with the error:

JScript Panel (Library Tree v0.1 by Wilb): JavaScript runtime error:
Unable to get property 'Count' of undefined or null reference
File: <main>
Line: 322, Col: 29
<source text only available at compile time>
Title: Re: Library Tree Discussion
Post by: MachineHead on 2016-01-29 16:43:56
Library Tree v0.1 is not the most recent. Check forum upload for latest,
Title: Re: Library Tree Discussion
Post by: Axonn on 2016-01-29 17:10:07
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?
Title: Re: Library Tree Discussion
Post by: marc2003 on 2016-01-29 17:12:13
Have you configured foobar to monitor your music folders?

File>Preferences>Media library
Title: Re: Library Tree Discussion
Post by: Axonn on 2016-01-29 17:16:03
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! :)
Title: Re: Library Tree Discussion
Post by: WilB on 2016-01-30 18:41:49
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 (https://hydrogenaud.io/index.php/topic,110938.msg915286.html#new)
Title: Re: Library Tree Discussion
Post by: blaxima on 2016-01-30 20:19:52
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
Title: Re: Library Tree Discussion
Post by: WilB on 2016-01-30 23:05:37
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 (https://hydrogenaud.io/index.php/topic,110938.msg915297.html#new)
Title: Re: Library Tree Discussion
Post by: blaxima on 2016-01-30 23:45:07
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 (https://hydrogenaud.io/index.php/topic,110938.msg915297.html#new)

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

Thanks again
Title: Re: Library Tree Discussion
Post by: Axonn on 2016-02-01 08:26:06
Very nice to see such an active developer! :). Good job brother!
Title: Re: Library Tree Discussion
Post by: jazzthieve on 2016-02-27 11:06:53
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.
Title: Re: Library Tree Discussion
Post by: WilB on 2016-02-27 13:28:33
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
Title: Re: Library Tree Discussion
Post by: jazzthieve on 2016-02-27 15:48:45
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.
Title: Re: Library Tree Discussion
Post by: fabiospark on 2016-02-27 20:33:02
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.
Title: Re: Library Tree Discussion
Post by: Isabelxxx on 2016-03-21 00:31:35
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.
Title: Re: Library Tree Discussion
Post by: Just_Addict on 2016-04-02 02:33:58
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.
Title: Re: Library Tree Discussion
Post by: Just_Addict on 2016-04-02 13:48:27
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)
Title: Re: Library Tree Discussion
Post by: WilB on 2016-04-15 16:28: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 (https://hydrogenaud.io/index.php/topic,110938.msg920386.html#new)
Title: Re: Library Tree Discussion
Post by: Qwghlm on 2016-05-04 19:04:12
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
Title: Re: Library Tree Discussion
Post by: xiaNaix on 2016-05-07 23:11:23
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%)
Title: Re: Library Tree Discussion
Post by: Qwghlm on 2016-05-09 11:43:48
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
Title: Re: Library Tree Discussion
Post by: xiaNaix on 2016-05-09 19:22:55
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!
Title: Re: Library Tree Discussion
Post by: Axioma1 on 2016-05-16 16:01: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?
Title: Re: Library Tree Discussion
Post by: WilB on 2016-05-20 11:36:27
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 (https://hydrogenaud.io/index.php/topic,110938.msg922553.html#new)
Title: Re: Library Tree Discussion
Post by: Axioma1 on 2016-05-23 09:02:01
Nice! Thank you!
Title: Re: Library Tree Discussion
Post by: eddy_stylez on 2016-06-06 00:45:44
@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.
Title: Re: Library Tree Discussion
Post by: seriousstas on 2016-06-29 12:41:26
I use the View by Folder Structure
How can I see only the folders adding for such? :
(http://rgho.st/7pY49dnM2/image.png) (http://rgho.st/7pY49dnM2.view)
(http://rgho.st/8cfgCLn4Q/image.png) (http://rgho.st/8cfgCLn4Q.view)
(http://rgho.st/6TWW26jh9/image.png) (http://rgho.st/6TWW26jh9.view)
Title: Re: Library Tree Discussion
Post by: Alwazn on 2016-07-10 06:03:40
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.
Title: Re: Library Tree Discussion
Post by: WilB on 2016-09-04 17:14:11
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 (https://hydrogenaud.io/index.php/topic,110938.msg927729.html#new)
Title: Re: Library Tree Discussion
Post by: Falstaff on 2016-09-04 20:41:53
@WilB

Thank you for delivering to us the best jscript panel ever imho, still updated thru 1.0, keep the good work  ;)
Title: Re: Library Tree Discussion
Post by: Rocker on 2016-09-24 23:11:14
WiLB, this component is awesome! Thank you for sharing!
Title: Re: Library Tree Discussion
Post by: WilB on 2016-10-18 00:15:34
^ Thanks for the compliments...

New Version: Library Tree 1.1

CHANGELOG

Fixed a draw issue in folder view

Library Tree 1.1 (https://hydrogenaud.io/index.php/topic,110938.msg929672.html#new)
Title: Re: Library Tree Discussion
Post by: always.beta on 2016-10-18 14:27:21
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.
Title: Re: Library Tree Discussion
Post by: seriousstas on 2016-10-18 21:01:02
Add please zoom (or resizing) for Node. Convenient for the touch - panels. Thank you! :
(http://i.piccy.info/i9/8ab8f67ed644c0cab17b0f5b938a3297/1476820639/22653/1080699/2016_10_18_22_56_02_500.jpg) (http://piccy.info/view3/10411865/2b725263bd5fc567a67e81b4d177ca21/)(http://i.piccy.info/a3/2016-10-18-19-57/i9-10411865/500x309-r/i.gif) (http://i.piccy.info/a3c/2016-10-18-19-57/i9-10411865/500x309-r)
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2016-10-20 10:05:48
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.
Title: Re: Library Tree Discussion
Post by: seriousstas on 2016-10-29 02:38:09
WilB
1 .If turn on All Music and collapse the tree -
list disappears.
2 Add to Current Playlist  - add always just in  "Library view"
Title: Re: Library Tree Discussion
Post by: seriousstas on 2016-10-29 10:26:31
And a couple wishes..
Please make a handy library for touch devices:
This - finger scrolling.
"Node" - zoomable
Title: Re: Library Tree Discussion
Post by: WilB on 2016-11-01 13:04:32
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
Title: Re: Library Tree Discussion
Post by: du22y on 2016-11-01 21:16:43
@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 (https://drive.google.com/file/d/0B60qIBsIiUkgRnBCVlJfUXJkdzg/view?usp=sharing)
(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  ;) .
Title: Re: Library Tree Discussion
Post by: seriousstas on 2016-11-01 21:47:15
Library v 1.1 & JS Smooth Playlist
For example, I create a new - with the name "My new playlist," and make it active.
  If  send folder through the menu Add to Current Playlist, instead of adding to the Current ( "My new playlist"),
  the addition will always be in the "Library view"

Insert in Current Playlist - work correctly .
Title: Re: Library Tree Discussion
Post by: WilB on 2016-11-02 12:58:00
^ I still can't reproduce & so the issue is unconfirmed. I tried by creating a new playlist in both sim_playlist manager and JS Smooth Playlist, activated the playlist and used the library tree menu "Add to Current Playlist". Items were always correctly added to the new playlist. I've repeated it many times without issue, on two different foobar2000 set-ups. I assume you don't inadvertently left click first, which may activate library view resulting in "Add to Current Playlist" then using that playlist...

@du22y I can reproduce that issue & believe I have fixed it in my version. The fix should be in the next release

Thanks for the feedback
Title: Re: Library Tree Discussion
Post by: du22y on 2016-11-03 00:31:59
@WilB
Awesome !
Thank you for your hard work  ;) .
Title: Re: Library Tree Discussion
Post by: seriousstas on 2016-11-04 01:32:16
 
Quote
I still can not reproduce & so the issue is unconfirmed
:-[  I all the same used in the old version ...
  @version "1.1" all is well

Quote
The fix should be in the next release
and this please:
Quote
1 .If turn on "All Music" and collapse the tree -
list disappears.

Hope for the "Node" is a decision on the size of the change  +  and  - icon :
Title: Re: Library Tree Discussion
Post by: sstavross on 2016-11-04 12:39:07
Hi!

Thank you for your excellent script! It is very usefull!
Only one question : Can we use it for other playlists except from music library?  Lets say I want your script to list my "Chopin playlist" with all the items I have in this particular list. Is this possible?
Title: Re: Library Tree Discussion
Post by: WilB on 2016-11-04 18:43:51
@seriousstas: I had already fixed/implemented those (and point raised by always.beta) in my version

@sstavross: It's a library viewer and so doesn't read data from playlists

However, you can type, e.g. "Chopin" without the quotes in the search box, to have a tree view of the tracks

Or you can create a filter for the library that's permanently available, e.g. use query "Chopin" without quotes. Such a filter would work like an autoplaylist for "Chopin" since its updated when the library content changes + offering the advantage of a tree view of the contents
Title: Re: Library Tree Discussion
Post by: WilB on 2016-11-04 22:53:05
New Version: Library Tree 1.2

CHANGELOG

Added configurable "Node: Size" & "Scroll: Smooth Scroll Level..." that may help touch device users (panel properties)
Improved interaction with playlist, especially when using Ctrl key
Fixed Allmusic node collapse regression
Fixed search paste issue with long search text

Library Tree 1.2 (https://hydrogenaud.io/index.php/topic,110938.msg930482.html#new)
Title: Re: Library Tree Discussion
Post by: seriousstas on 2016-11-06 18:00:25
Thank you so much !
"Node: Size" - I would hope to change the icon size, and not just distance.
Quote
  that may help touch device users.
  For work on a touch device - moving playlist should be a mouse with holding down the left button.
"_PROPERTY: Touch control" in "JS Smooth Playlist"  Then it emulates the movement of a finger.
Title: Re: Library Tree Discussion
Post by: iAlienator on 2016-11-12 14:15:48
Hi, really enjoying the library tree script so far myself.

There is one small thing I noticed while playing around it a bit more, and it is that the mouse scrolling behaves in a bit weird way when more elements are collapsed. So instead it scrolling the default amount (usually 3 lines at a time) down, it scrolls by some really big amount at a time. And it only happens when the nodes in the tree are collapsed outwards, while on the root level the mouse scroll is completely fine.

edit: actually it doesn't seem to be fine even on root level, but more to do with how much of the tree is on the view and how much is not. So when the visible area gets small enough the scroll seems to broke and scroll way more than it should on single scroll up/down.
Title: Re: Library Tree Discussion
Post by: WilB on 2016-11-12 16:29:44
I couldn't reproduce any scrolling issues & no one else has reported any. By default the script uses "Page Scroll" and so will scroll by a large amount, depending on the info to be displayed etc. You can set "Scroll - Mouse Wheel: Page Scroll" to false in panel properties for standard 3 line scrolling. I hope that helps.
Title: Re: Library Tree Discussion
Post by: seriousstas on 2016-11-12 16:40:32
WilB
I use   symb_style = 1  to zoom icons tree :
https://www.youtube.com/watch?v=wf4xUcOacnQ
Thank you for the excellent library !
Title: Re: Library Tree Discussion
Post by: iAlienator on 2016-11-12 16:56:30
I couldn't reproduce any scrolling issues & no one else has reported any. By default the script uses "Page Scroll" and so will scroll by a large amount, depending on the info to be displayed etc. You can set "Scroll - Mouse Wheel: Page Scroll" to false in panel properties for standard 3 line scrolling. I hope that helps.
Oh I never noticed that page scroll option there, would have probably checked that if I had any idea there was option for it. So anyways thanks for the info, that did indeed solve the scroll issue I was having.
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2016-11-18 16:29:27
@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
Well, it's my attempt to make foobar behave more Winamp-escque =)
My usage scenario is quite simple - I use Library Tree as 'file' browser (Library View PL is used as a simple playlist, that is populated only via double-click or manual addition). I.e. I can freely move through directories\playlists and etc without worrying, that my playlists might be emptied or changed. That's why I want to avoid 'send to playlist' via single LMB click.

Your script is the only one that I could 'force' to behave like that (+ it's stylish and suits my foobar's theme), so I was hoping, that it would be possible to implement it as a build-in feature, as to avoid patching it manually every release.
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.
Yeah, forgot about that... I guess it might be impossible to implement my request while retaining all the other functionality without changing a lot of code :\
Title: Re: Library Tree Discussion
Post by: KoO on 2016-11-29 01:57:08
@WilB
Thanks for your fine work as I have been using Library Tree almost right from the start. And it just keeps getting better..

(http://i.imgur.com/YoUoMjd.png)
Title: Re: Library Tree Discussion
Post by: condenado on 2017-01-13 12:36:04
@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
Well, it's my attempt to make foobar behave more Winamp-escque =)
My usage scenario is quite simple - I use Library Tree as 'file' browser (Library View PL is used as a simple playlist, that is populated only via double-click or manual addition). I.e. I can freely move through directories\playlists and etc without worrying, that my playlists might be emptied or changed. That's why I want to avoid 'send to playlist' via single LMB click.

Your script is the only one that I could 'force' to behave like that (+ it's stylish and suits my foobar's theme), so I was hoping, that it would be possible to implement it as a build-in feature, as to avoid patching it manually every release.
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.
Yeah, forgot about that... I guess it might be impossible to implement my request while retaining all the other functionality without changing a lot of code :\

Hi TheQwertiest, could you share the complete code with singleclick autofill disabled? I can't make it with your past instructions, Thanks!
Title: Re: Library Tree Discussion
Post by: WilB on 2017-01-13 15:46:59
@TheQwertiest & @condenado

Just to confirm that I had already added the ability to disable single click auto-fill in my copy. When single-click auto-fill is disabled, the playlist will be only be filled on left double-click or manually.

There will be a new a release shortly incorporating this feature, when I have finalised a request from always.beta...

HTH
Title: Re: Library Tree Discussion
Post by: condenado on 2017-01-13 17:09:08
@TheQwertiest & @condenado

Just to confirm that I had already added the ability to disable single click auto-fill in my copy. When single-click auto-fill is disabled, the playlist will be only be filled on left double-click or manually.

There will be a new a release shortly incorporating this feature, when I have finalised a request from always.beta...

HTH

Perfect!! I'll be waiting. Thanks WilB.
Title: Re: Library Tree Discussion
Post by: always.beta on 2017-01-15 14:45:28
There will be a new a release shortly incorporating this feature, when I have finalised a request from always.beta...
I am glad to hear you say that you are adding a feature I want. Thanks WilB. Can you share a modified version? Its appearance (scroll bar) is similar to Br3tt’s JSS~.
Title: Re: Library Tree Discussion
Post by: colagen on 2017-01-21 15:32:04
Hi,

This component is greatn thank you
A suggestion : For each node, can you make the whole line clickable instead of just the text ? maybe it can expand the node when the mouse click is before the node's text, and it can send to playlist when the click is on the node's text, or after the node text.
It will make the script a little more intuitive to use.
Title: Re: Library Tree Discussion
Post by: colagen on 2017-01-28 13:37:33
Hi,

This component is greatn thank you
A suggestion : For each node, can you make the whole line clickable instead of just the text ? maybe it can expand the node when the mouse click is before the node's text, and it can send to playlist when the click is on the node's text, or after the node text.
It will make the script a little more intuitive to use.
It's okey, i managed to update the script myself. One last thing which would be great is to expand the nodes which match the search string, when performing a search. I tried to do it also, but it require a good understanding of the code, and probably significant changes, so i gave up.
Title: Re: Library Tree Discussion
Post by: WilB on 2017-02-05 22:45:38
@collagen I have added the requested features and they will be in the next release.

@always.beta Your requests will also be in the next release.
Title: Re: Library Tree Discussion
Post by: WilB on 2017-02-11 17:19:13
New Version: Library Tree 1.3 (https://hydrogenaud.io/index.php/topic,110938.msg935524.html#new)

Thanks for the feedback.

CHANGELOG

ADD: Ability to disable single-click auto-fill of the playlist. When disabled, the playlist can be filled manually, from the menu, or on double click. Set in panel properties; "Text Single-Click: AutoFill Playlist" and adjust "Text Double-Click" according to taste.

ADD: "Expand" (right click menu): fully expands node (N/A for large nodes).

ADD: "Collapse All" (right click menu).

ADD: Auto expand search results. Operates when list is refined sufficiently – see technical notes below. Default is off.  Enable in panel properties: "Search Results Auto Expand".

ADD: Improved custom node icon options, e.g. chevron arrows like >. To use, enable "Node: Custom..." in panel properties.

ADD: Improved navigation. Node selection area is bigger + nodes highlight on hover (can be disabled). Additionally, active text area can be increased by enabling "Text Whole Line Clickable" in panel properties.

ADD: Node size can now be zoomed (mouse-over > Ctrl + Alt + mouse wheel).

CHG: Zoom. Ctrl + Alt + mouse wheel are now required to zoom the font, filter and node sizes on mouse over. This is to stop ctrl selection of tracks while scrolling sometimes causing zooming.

ADD: Custom node colours (panel properties).

ADD: Customisable scrollbars (panel properties).

FIX: Minor draw issues.

Technical notes

1) The menu "Expand", and search results "Auto Expand", have default limits of 500 & 350 tracks, respectively. This is for efficiency reasons & because expanding to large lists impedes navigation. Thresholds can be changed in: "ADV.Limit..." in panel properties.

2) Availability of custom icons may depend on fonts installed. The icon font can be set in panel properties. Font symbols can be pasted in.

3) Ensure comma "," separators are retained where used in panel properties.

4) Some panel properties have changed & redundant removed (view & view filter patterns unaffected). Export panel properties, before updating, if you need a record.
Title: Re: Library Tree Discussion
Post by: nikolai4ik on 2017-02-11 18:07:08
thanks!
Title: Re: Library Tree Discussion
Post by: WilB on 2017-02-12 18:23:57
New Version: Library Tree 1.3.1 (https://hydrogenaud.io/index.php/topic,110938.msg935555.html#new)

CHANGELOG

Fix: Draw regression
Title: Re: Library Tree Discussion
Post by: Black_Over_Bills_Mothers on 2017-02-12 19:38:50
Hi WiiB
Great new version (1.3.1). Thanks for all your hard work.

I've found a small annoyance. I use the following query for getting a tree of Genres;
View by Genre // %<genre>%|[%band% - ]%album%|[[%discnumber%.]%tracknumber% ][%track artist% - ]%title%

I use multi-value genres.

However the panel crashes at line 583, Col 93. Unable to get property 'name' of undefined or null reference.

It could well be my inconsistant tagging but I wouldn't expect a crash.
Title: Re: Library Tree Discussion
Post by: colagen on 2017-02-12 21:58:23
Thanks. Finally i did it myself on my custom library tree, but a little bit differently : on my script, when there is one node only at any level of the tree, this node is automatically expanded. Like that it work for the search results, but it also work when an artist have only one album, when you expand the node of this artist, you see directly the tracks of the album.
I added a property called autoExpendOnSingleChild, and i added the line of code below at the complete end of the function named "branch" of the object "populate".

if(br.child.length==1 && pop.autoExpandSingleChild) pop.branch(br.child[0]], false , true);      
Title: Re: Library Tree Discussion
Post by: Black_Over_Bills_Mothers on 2017-02-13 18:14:19
Hi Wilb. Firstly many thanks for a great component and it keeps getting better.

I have found a small problem with the following view;

View by Genre // %<genre>%|[%band% - ]%album%|[[%discnumber%.]%tracknumber% ][%track artist% - ]%title%

As you should see I use multi-value genres.

I get a crash popup window telling me that at line 583 Col 93. 'Unable to get property 'name' of undefined or null reference.

It may be my inconsistant tagging but I wouldn't expect a crash.
Title: Re: Library Tree Discussion
Post by: WilB on 2017-02-15 21:42:07
New Version: Library Tree 1.3.2 (https://hydrogenaud.io/index.php/topic,110938.msg935692.html#new)

CHANGELOG

FIX: Regression in multi-value tag handling
Title: Re: Library Tree Discussion
Post by: GSmirnov on 2017-03-03 18:42:55
Hi. View by Folder Structure doest`n work?
Title: Re: Library Tree Discussion
Post by: WilB on 2017-03-03 20:38:07
It's working for me. I tried on main + portable install + no one else has reported issues.  I assume you have the foobar2000 media library enabled and it contains music. Bear in mind common folders aren't displayed - it should look similar to DUI album list with view by folder structure for comparison.
Title: Re: Library Tree Discussion
Post by: GSmirnov on 2017-03-03 20:56:09
It's working for me. I tried on main + portable install + no one else has reported issues.  I assume you have the foobar2000 media library enabled and it contains music. Bear in mind common folders aren't displayed - it should look similar to DUI album list with view by folder structure for comparison.

Oh. Sorry, my mistake. I use WSH panel =))
Now all working!

But I'm not sure that correctly understood the last sentence. Explain in detail please, if possible with screenshots
Title: Re: Library Tree Discussion
Post by: Axonn on 2017-03-28 11:07:41
Hey :). I'm curious if there's any version of the script that has better formatting and/or comments. Right now some lines are more than 300 characters long and I keep wondering if there's something wrong I did when loading the script. It almost looks like it's generated from some other tool. If this is the way you write code, then please don't take my comment as an insult. I'm sure that you have your preferences and if that's the case, I definitely won't comment against somebody that has done such awesome work for free :). I am merely trying to browse & understand the code so that I may learn to do some JSPanel components myself.
Title: Re: Library Tree Discussion
Post by: zeremy on 2017-03-28 11:24:13
Hey :). I'm curious if there's any version of the script that has better formatting and/or comments. Right now some lines are more than 300 characters long and I keep wondering if there's something wrong I did when loading the script. It almost looks like it's generated from some other tool. If this is the way you write code, then please don't take my comment as an insult. I'm sure that you have your preferences and if that's the case, I definitely won't comment against somebody that has done such awesome work for free :). I am merely trying to browse & understand the code so that I may learn to do some JSPanel components myself.

Use http://jsbeautifier.org/ on the code .will help you browse it easier.
Title: Re: Library Tree Discussion
Post by: Axonn on 2017-03-28 22:06:40
That's a pretty nice tool. Thank you! :). However, it's just a workaround. I am still wondering if the WilB has a better source somewhere. If not, I'm cool with that! :).

One more thing: do you know any other JSPanel components? Is there a repository for updated components (that work with the latest JSPanel)? I already have the "Smooth series" (br3tt). I'm trying to find more samples to look at :).
Title: Re: Library Tree Discussion
Post by: San_dr on 2017-04-12 14:34:51
Hi Wilb!
I'm not a programmer and my English is bad, but I'll try :))))
good plugin, I use it at DUI,placing it under the standard playlist. (so that the coordinate "x" they have the same), and the horizontal separation between them moving manually, if necessary. Added to the script line "window.MinHeight=55;" (this can't reduce the window to zero and forget about it.) How to change the script so that when you turn on the player folder "All Music" was curtailed and the condition "window.MaxHeight = window.MinHeight" performed? But if clicked on the "minus" button (expand) to the left of the folder "All Music", or started "the search"- then the condition "window.MaxHeight" was terminated (false) , and the window was slightly extended in height (to get noticed and could manually increase the height of the window if you want) - for example "window.Height = window.MinHeight*3" , and when you click on the "plus" sign (collapse) "All Music" again became "window.MaxHeight = window.MinHeight" (true)

==============================
thought also that it can be easier to set two values of the height of the window selected by the user, and switch between them with the button "All Music" to expand/collapse
Title: Re: Library Tree Discussion
Post by: jaysong on 2017-04-14 04:19:51
I am moving my music library to a new laptop where folder structure is changed.  I realize all those playlist files .fpl keep absolute folder structures like C:\Users\Jay\Documents\personal\foobar2000\Music library\.  I need to figure out a way to keep these file locations to be relative on the original laptop so that the new laptop can locate .cue files by a relative point.  Any ideas?  It'll be very much appreciated.

Thanks.  Jay
Title: Re: Library Tree Discussion
Post by: colagen on 2017-04-14 13:16:56
I am moving my music library to a new laptop where folder structure is changed.  I realize all those playlist files .fpl keep absolute folder structures like C:\Users\Jay\Documents\personal\foobar2000\Music library\.  I need to figure out a way to keep these file locations to be relative on the original laptop so that the new laptop can locate .cue files by a relative point.  Any ideas?  It'll be very much appreciated.

Thanks.  Jay
It seems that your issue isn't related to Library Tree Jscript. You should start a new topic, in the "general (https://hydrogenaud.io/index.php/board,27.0.html)" board
Title: Re: Library Tree Discussion
Post by: WilB on 2017-04-20 18:05:44
New Version: Library Tree 1.3.3 (https://hydrogenaud.io/index.php/topic,110938.msg938251.html#new)

CHANGELOG

ADD: Option for All Music node expand/collapse to change panel height, e.g. so library tree only occupies a small space when not actively used. In this mode, typing in search also auto-expands the panel. Enable and set expand/collapse sizes in panel properties (ADV.Height...).

If the feature is used, note the following requirements and recommendations:
  - Back-up layouts, by exporting theme files (DUI) or fcl files (CUI), in case of unwanted sizing effects that, could arise if the next point isn't implemented
  - Must be another panel above or below library tree
  - "Node: Show All Music" has to be enabled in panel properties
  - N/A if library tree is in a panel stack splitter container
Title: Re: Library Tree Discussion
Post by: San_dr on 2017-04-21 14:05:25
Thanks, WilB! Promptly fulfilled. :))
With customized Autokollapse has become much more convenient.
Title: Re: Library Tree Discussion
Post by: Lucidae on 2017-06-14 07:41:58
Thanks WilB for creating this plugin, it's made my layout much more functional.

I'm using library tree in conjunction with the jscript album art viewer - it works fine with "prefer now playing", but if I set it to "follow selected track", the artwork is not updated when the selection is changed. Is there a way around this?
Title: Re: Library Tree Discussion
Post by: marc2003 on 2017-06-14 17:39:09
There are 2 issues with what you're trying to do.

Unfortunately, my artwork panel does not update with library viewer selections, only playlist. I've updated the menu in the next version to avoid confusion. https://github.com/19379/foo-jscript-panel/commit/a102874eed63d74f8ec1dc127d7596bd623d3e6e

Secondly, this Library Tree script doesn't yet support updating the selection so even the default UI artwork panel wouldn't update. There is a way to do it with JScript Panel but it was a feature added by a previous developer when the component was under its original name of WSH panel mod. The original docs didn't really explain how to use it properly but I've just about figured it out. I need to update the docs with an example that WilB could implement in this script. I'll post back when that is done.

edit: I've drafted something here, hopefully it makes sense...

https://github.com/19379/foo-jscript-panel/blob/deb88db224a247309ad8a3a82ae33ff77d6b2e8e/component/docs/Interfaces.txt#L63L123
Title: Re: Library Tree Discussion
Post by: Blockdude on 2017-07-06 01:28:29
WilB, thanks for this component, but is there any chance of being able to filter multiple of the same item?
ie: filter only one genre from a specific artist, filtering it to match 2 genre tags (Dance and Electro), and filtering to exclude certain tags.
Title: Re: Library Tree Discussion
Post by: WilB on 2017-07-26 10:48:30
@Blockdude. If I understand you correctly, then that depends on the filter Query used. Check out the foobar2000 Query syntax.

@Black_Over_Bills_Mothers
Code: [Select]
View by Band // $if2($swapprefix([$meta(band,0)],A,The), 'Non Album')|$if($stricmp($meta(band,0),various artists),,['('%date%') '])%album%[|Disk %discnumber%]|[%tracknumber% ][%track artist% - ]%title%
Your above pattern is attempting to insert a conditional branch that the script doesn't support, as described in the documentation. It does handle the scenario by inserting a hyphen instead. The reasons for not supporting conditional branches have been discussed before (https://hydrogenaud.io/index.php/topic,110938.msg914836.html#msg914836). Essentially adding the feature would require re-writing much of the library handling in a different way, and since its running in jscript, that way would slow things down too much based on my tests.

The best patterns I quickly came up with are as follows:
Code: [Select]
View by Band // $if2($swapprefix([$meta(band,0)],A,The), 'Non Album')|$if($stricmp($meta(band,0),various artists),,['('%date%') '])%album%|[[%discnumber%.]%tracknumber% ][%track artist% - ]%title%
View by Band // $if2($swapprefix([$meta(band,0)],A,The), 'Non Album')|$if($stricmp($meta(band,0),various artists),,['('%date%') '])%album%[ - Disk %discnumber%]|[%tracknumber% ][%track artist% - ]%title%

@Lucidae & marc2003. There will be a new version shortly with library viewer selection support.
Title: Re: Library Tree Discussion
Post by: WilB on 2017-07-26 18:58:26
New Version: Library Tree 1.3.5 (https://hydrogenaud.io/index.php/topic,110938.msg942684.html#new)

CHANGELOG

ADD: Library viewer selection support (thanks to marc2003 for info). Mostly, this improves interaction with default user interface album artwork panel. Most users won't notice much difference as it already worked through playlist selection.

@Lucidae: JScript biography album art panel, when set to follow selected track (uncheck "Menu > Sources > Now Playing"), has always given the behaviour you described with default library tree settings. Default user interface album artwork panel will also now work the way you want.
Title: Re: Library Tree Discussion
Post by: WilB on 2017-07-28 11:30:20
New Version: Library Tree 1.3.6 (https://hydrogenaud.io/index.php/topic,110938.msg942792.html#new)

CHANGELOG

CHG: Re-worked library handling so that conditional branches are now supported, e.g. discnumber in example below:

Code: [Select]
View by Artist // %artist%|%album%[|Disc %discnumber%]|[%tracknumber%. ][%track artist% - ]%title%

Speed is better than previous for initialisation of most views.
Title: Re: Library Tree Discussion
Post by: Black_Over_Bills_Mothers on 2017-07-29 22:14:06
Hi WilB
Many thanks for this. I'll try it in the morning.
Title: Re: Library Tree Discussion
Post by: Black_Over_Bills_Mothers on 2017-07-30 07:54:15
Hi WilB
GREAT! It works just fine. Thank you very much for your work on this script.
Title: Re: Library Tree Discussion
Post by: Lucidae on 2017-08-02 08:11:13
New Version: Library Tree 1.3.5 (https://hydrogenaud.io/index.php/topic,110938.msg942684.html#new)

CHANGELOG

ADD: Library viewer selection support (thanks to marc2003 for info). Mostly, this improves interaction with default user interface album artwork panel. Most users won't notice much difference as it already worked through playlist selection.

Thanks for this update, exactly what I was hoping for!

I have another small request - could you add an option to change the panel edge style, so it can closer match other DUI elements?
Title: Re: Library Tree Discussion
Post by: WilB on 2017-08-02 11:38:03
Panel edge style can already be set: none, sunken or grey, in line with other components. This is controlled by JScript panel itself & not the script. To set: shift + right click Library Tree, choose configure & the "Edge Style" setting is at the bottom of the JScript Panel Configuration window.
Title: Re: Library Tree Discussion
Post by: WilB on 2017-08-24 15:47:15
New Version: Library Tree 1.3.7 (https://hydrogenaud.io/index.php/topic,110938.msg944078.html#new)

CHANGELOG: Various optimisations
Title: Re: Library Tree Discussion
Post by: miras on 2017-08-27 23:52:34
Hi WilB, I'm using your great script and I have another question.
Library Tree is a great substitute to Filter Columns UI panel and others.
But can I get a "playback playlist" behaviour? Like "Filter Results" and "Filter Results (Playback)" playlists in Filter panel? 
I have been using Filter Panel + Graphical Browser + marc2003 Playlist for a long time. I lost something very obvious or Filter Panel it's only to have this two default playlist behavior? Maybe with some plugin? Thanks a lot!
Title: Re: Library Tree Discussion
Post by: WilB on 2017-08-28 12:48:04
As far as I am aware only the facets/filter style library viewers offer a separate playback playlist, which it seems has to be selected by some type of playlist manager. So I didn't get on with the way that worked.

JScript Library Tree aims to retain the playing status of the playing track in the playlist (i.e. highlighted with playing symbol) when clicking on different nodes and then returning back to clicking on a node containing the playing track.
Title: Re: Library Tree Discussion
Post by: culinko on 2017-08-29 14:09:14
Hi WilB, looks like I found another one of your great works :)

So far it does everything I would want it to, except one small thing. I wonder if I missed a setting for it somewhere. The thing is that if you have 2 group levels (2x | sign), you can expand the tree 2 times (2x plus sign) to get all the way to the individual tracks, such as in your Album Artist View. But if you have only 1 group level, such as in your Album View, there is no plus sign so you can't expand the tree to see the individual tracks at all. Is it possible to have the plus sign displayed for only 1 group leve? Thanks a lot!
Title: Re: Library Tree Discussion
Post by: WilB on 2017-08-29 17:35:17
Thanks for the report.

Unfortunately a regression has arisen in v1.3.7. If the issue affects you, then v1.3.6 is working fine, until the issue is fixed.
Title: Re: Library Tree Discussion
Post by: culinko on 2017-08-30 00:40:17
Yeah, I can confirm that the issue is no longer present in v1.3.6, so I will be using that one until it's fixed. Thanks for the advice.
Title: Re: Library Tree Discussion
Post by: culinko on 2017-08-30 15:02:37
I found one more thing which doesn't work for me, not sure if it's a bug in the Library Tree or something in Foobar. When I use the | sign to add another group level inside an if condition, the code won't work. I know the conditions work for 1 level of grouping, so title formatting seems to be supported inside both the custom sort and view patterns of your Library Tree.

E.g. this code with 1 level of grouping works:
Code: [Select]
$if($strcmp(%directoryname%,Hudba),%directoryname%,%album artist% - %album% '['%date%']')
but this code with 2 levels doesn't:
Code: [Select]
$if($strcmp(%directoryname%,Hudba),%directoryname%|[%artist% - ]%title%,%album artist% - %album% '['%date%']'|%discnumber%.%tracknumber%. [%artist% - ]%title%)

Is there anything I need to change in order to make this work? Thanks a lot, much appreciated!
Title: Re: Library Tree Discussion
Post by: WilB on 2017-09-05 15:59:46
New Version: Library Tree 1.3.8 (https://hydrogenaud.io/index.php/topic,110938.msg944563.html#new)

CHANGELOG

FIX: Regression
FIX: Certain views with conditional branches weren't displaying properly

@culinko. The issues raised should be fixed.
Title: Re: Library Tree Discussion
Post by: huggy020 on 2017-09-30 02:26:35
Thank you for this library viewer. Best of the best. :3

.........  option for items counting.  It will be great if numbers in brackets can show correspondingly the number of sub-folders (artists) in genre folders, the number of albums in artist folders and the number of songs in album folders.
(https://i.imgur.com/TyuqG3V.png)

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)

Would you now consider these option in the future, for those of us who collect mainly albums instead of singles. Thanks you kindly.
Keep up the good work. This is brilliant

Title: Re: Library Tree Discussion
Post by: MojoBass on 2017-10-02 13:55:31
WilB, your JS plugins are really great!!
General question to your plugins (Library Tree, YTTM, Bio): is there a way to assign specific menu items, which are usually accessed by right mouse, to a button (eg most liked filters in the Library Tree)? If it requires specific coding, a small example would be great from where I could start create own buttons.
Thanks very much,
MojoBass
Title: Re: Library Tree Discussion
Post by: WilB on 2017-10-05 19:20:54
New Version: Library Tree 1.3.9 (https://hydrogenaud.io/index.php/topic,110938.msg945843.html#new)

CHANGELOG

ADD: Improved sorting of multi-value items sent to playlist. As before a custom sort can also be used.
CHG: Node Item Count. Either sub-items counts or track counts (as before) can now be displayed. Set preference in panel properties.
ADD: Menu item (shift + right click) to batch create m-TAGS. Runs m-TAGS creator. Follow instructions on menu item. See documentation for full info.

@mojobass It's possible to create buttons in the script, by adding more onto the button_manger object. If you mean elsewhere then notify (search interfaces for notify) might be able to be used to communicate with another JScript panel containing the buttons, but I don't think it would work if the buttons were elsewhere.
Title: Re: Library Tree Discussion
Post by: huggy020 on 2017-10-07 04:24:52
New Version: Library Tree 1.3.9 (https://hydrogenaud.io/index.php/topic,110938.msg945843.html#new)

CHANGELOG
.........
CHG: Node Item Count. Either sub-items counts or track counts (as before) can now be displayed. Set preference in panel properties.
.........

thank you
Title: Re: Library Tree Discussion
Post by: MojoBass on 2017-10-07 05:32:15
@mojobass It's possible to create buttons in the script, by adding more onto the button_manger object. If you mean elsewhere then notify (search interfaces for notify) might be able to be used to communicate with another JScript panel containing the buttons, but I don't think it would work if the buttons were elsewhere.
Thank you very much for this Info. I will look into it (but not too sure if I am able to do adaptions in the buttom_manager...).
Title: Re: Library Tree Discussion
Post by: novaca on 2017-10-09 09:36:28
I also thank you for the sub-items counts...
I really think it's more useful than track counts.
Title: Re: Library Tree Discussion
Post by: musikomaniak on 2017-11-10 10:07:50
Hi,
I did not find where to increase font size.
I use Ctrl + Alt + mouse wheel, but it's not very practical.
I'd like something like SEGOE semibold 10.
Title: Re: Library Tree Discussion
Post by: MojoBass on 2017-11-11 05:01:42
In Panel Properties put '_CUSTOM COLOURS/FONTS: USE' to 'True', then you can change the font at '_Custom.Font (Name, Size, Style [0-4])'.
Title: Re: Library Tree Discussion
Post by: musikomaniak on 2017-11-11 07:51:47
Thank you very much MojoBass.
I was changing font without putting "True" to CUSTOM COLOURS/FONTS: USE' !  :)
Title: Re: Library Tree Discussion
Post by: always.beta on 2017-11-12 01:49:41
Search: ALL I WANT FOR, crash. But search: All i want for, not crash.

JScript Panel (Library Tree v1.3.9 by WilB)
JavaScript 运行时错误:

File: <main>
Line: 992, Col: 58
<source text only available at compile time>
Title: Re: Library Tree Discussion
Post by: marc2003 on 2017-11-12 11:05:36
Well you can't use uppercase ALL because it has a special meaning in queries that returns everything. If you use double quotes around it then it's fine.

Code: [Select]
"ALL I WANT FOR"

But the script should have the fb.GetQueryItems function inside a try/catch statement to prevent errors (https://github.com/19379/foo-jscript-panel/blob/931e07797f107c317f03c8d1664dd118d006aba6/foo_jscript_panel/docs/Interfaces.txt#L216L224).
Title: Re: Library Tree Discussion
Post by: always.beta on 2017-11-12 11:37:35
If you use double quotes around it then it's fine.
Thank you.
Title: Re: Library Tree Discussion
Post by: WilB on 2017-11-15 12:54:54
New Version: Library Tree 1.3.9.1 (https://hydrogenaud.io/index.php/topic,110938.new.html#new)

CHANGELOG

FIX: Regression related to query syntax help.
FIX: Missing try/catch with one of the fb.GetQueryItems functions.
Title: Re: Library Tree Discussion
Post by: Tropoje on 2017-11-18 08:52:02
@WilB
This is fantastic. Thank you very much for your hard work with this component.
Is it possible to set the cover of the currently playing track as a background of Library Tree ? I looked in settings but maybe I missed something.
Title: Re: Library Tree Discussion
Post by: novaca on 2017-11-26 12:24:21
Is there a way to change the color of "Item Counts" (numbers in brackets) other than text?
I think that then it would be clearer.
Thanks.
Title: Re: Library Tree Discussion
Post by: eNforcer on 2017-12-06 23:21:58
What an amazing script, I'm loving it!
Title: Re: Library Tree Discussion
Post by: zoumbro on 2017-12-07 07:20:18
Library tree is so far one of the best feature of foobar. I am trying to customise my settings to my needs however due to my luck of knowledge I need some help.
I always use view by Folder Stucture.  In Filter option i would like to have an option o Most Played Folders in sort descending. I quess it has to be done smg with the aggregation of folder tracks
Title: Re: Library Tree Discussion
Post by: WilB on 2017-12-24 12:13:24
@Tropoje & novaca. The requested features should be in the next release.
@zoumbro. The aggregation methodology of the type you require isn't supported. The filter uses foobar2000 query syntax and AFAIK that doesn't support it either.
Title: Re: Library Tree Discussion
Post by: fabiospark on 2018-01-04 20:59:18
Is it possible to have the views list as a view?
I mean, I'd like to have all the views always visible together
without having to use the right click, like the old Playlist Tree
or the PLT mod called Library Tree.

This is what I mean.
(https://image.ibb.co/jRUwBb/PLT_mod_Library_Tree_multiview.png) (https://ibb.co/fCr9Wb)

Thanks
Title: Re: Library Tree Discussion
Post by: WilB on 2018-01-05 11:57:49
Nope.
Title: Re: Library Tree Discussion
Post by: WilB on 2018-01-24 18:00:29
^^^ Note that Library Tree 1.3.9.1 and earlier versions won't work with JScript panel v2+.
Title: Re: Library Tree Discussion
Post by: WilB on 2018-01-24 18:27:27
New Version: Library Tree 1.3.9.2 (https://hydrogenaud.io/index.php/topic,110938.msg951758.html#new)

CHANGELOG

ADD: Themes: dark, blend & light ("right click > menu > theme").
ADD: Option to set current cover as background ("right click > menu > theme"). Cover opacity & auto-fill can be set in panel properties ("Cover...").
ADD: Configurable root name. Choice of "All Music" or view name, e.g. "Artists", "All Genres" etc. Enable in panel properties "Node: Root..." and set view names as required. To show  number of artists etc, set "Node: Item Counts" to show "Sub-Items" [panel properties].
ADD: "Tree: Remember State" [panel properties]. Remembers expanded nodes, search & selection state etc on closing / opening foobar2000. Default is enabled.
ADD: "_Custom.Colour Item Counts" [panel properties].
FIX: Compatibility with JScript Panel v2.0.1.
Title: Re: Library Tree Discussion
Post by: Bratman on 2018-01-24 20:23:19
Great work but it's slow upon loading foobar? Taking 3-4 seconds to load after foobar has loaded.
Title: Re: Library Tree Discussion
Post by: always.beta on 2018-01-25 03:07:50
Did you forget to change it?
Title: Re: Library Tree Discussion
Post by: Tropoje on 2018-01-25 07:35:14
@WilB First of all, thank you very much for your work.
I love your "Library Tree". New options work as expected.
THANKS
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2018-01-25 09:11:17
@WilB : So many changes, but the version bump is so small.. I wonder what it takes to bump a 'major' version :P
Title: Re: Library Tree Discussion
Post by: KoO on 2018-01-27 03:14:39
Think I will stop at Library Tree 1.3.9.1 , foobar 1.3.16 portable , foo_jscript_panel 1.3.2.2 Every thing works great. To many changes with foo 1.4 and jscript v2 . May change my mind later...

Thanks for your great work..
Title: Re: Library Tree Discussion
Post by: WilB on 2018-01-27 17:33:33
@Bratman. I have not seen that type of behaviour. Initialisation times on my pc are nearly as fast as DUI album list, and unchanged from the previous version. The tree also appears as foobar2000 loads. Absolute initialisation times depend on pc speed, library size and complexity of view patterns. Note that JScript panel runs most things in the main thread and so conceivably could be delayed by other things. To optimise speed, check that the 'chakra' engine is being used. If updating to JScript panel 2.0.1, existing panels will default to the JScript engine and so it would need setting. Chakra engine is 1.15 - 1.5x faster during initialisation of views in my tests, and ~ 7-fold faster at certain other things, like recursive expansion. Mostly however the chakra engine gives a modest improvement. You could try switching off "Tree Remember State" in panel properties and avoid the themes to see if that makes any difference.
Title: Re: Library Tree Discussion
Post by: WilB on 2018-01-27 17:51:30
@always.beta

I can't reproduce that with the new version (1.3.9.2). Nothing should have changed for those items & all's working well on my test set-ups. All panel properties does is initially read the settings from the script, and those ones are identical to before. The settings are retained unless edited by the user. Try resetting the affected panel properties by deleting them.
Title: Re: Library Tree Discussion
Post by: Bratman on 2018-01-27 20:49:14
Nevermind I was using the first version. Still my foobar without Jscript installed loads in 3.0 seconds (I am using CUI) but with JScript 2.01 it loads in 4.4 seconds even before creating a JScript panel so it is too slow. Jscript 1.3.2.2 loads in 3.1 seconds very good but with your library tree 1.3.8 the console says 3.1 but it's not true my cursor is spinning and I am unable to do anything for 2-3 seconds. I tried you suggestions but they did not make a difference. Is it the size of my library it's very big? Although it is faster to use 2 CUI filters than Jscript library tree.

Also I lost all my edits to the JSmooth script installed 2.01 reverted it back to default and broke your biography script too.

^Edit Actually CUI library tree is even slower! Your library tree is faster but I never used library tree before I was using filters to browse library with Album Artist > Album and liked the black scroll bar / themes from your library script. I never knew library tree is that slow I prefer filters oh well back to white scroll bars lol
Title: Re: Library Tree Discussion
Post by: KoO on 2018-01-28 00:55:49
Updated to Foobar1.4b3 , JScript Panel v2.01 and Library Tree 1.3.9.2 runs Beautifully seems to load a bit quicker. {This is an updated portable version of foobar2000 v1.3.17}
(One day is long enough to hold back)

Thanks Foobar , marc2k3 & WilB   
Title: Re: Library Tree Discussion
Post by: Black_Over_Bills_Mothers on 2018-01-28 10:04:15
Crash
Hi WilB I'm using version 1.3.9.2 and getting

'undefined' is null or not an object
File: <main>
Line: 558, Col: 221


When I use a view;
View by Band // $swapprefix(%<band>%,A,The)|$if($stricmp($meta(band,0),various artists),,['('%date%') '])%album%[ '('%disctitle%')'][|Disk %discnumber%]|[%tracknumber% ][%track artist% - ]%title%

It seems to be the multi-value band tag that is causing it. If I use $meta(band,0) all is okay - but I don't get entries for the other values in the tag.
Title: Re: Library Tree Discussion
Post by: WilB on 2018-01-28 17:06:42
@Black_Over_Bills_Mothers. Thanks for the report. The issue seems to occur when running the script with the JScript engine. Under the 'chakra' engine the issue disappeared for me. Incidentally, note that in your example, $swapprefix applies to the whole str content. $swapprefix(%<field>%) doesn't split the values and apply $swapprefix to each. Any string manipulation function that removes a part of a string or inserts a substring by position is generally unsafe (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Titleformat_Album_List) in multi-value branching expressions.

All users of Library Tree 1.3.9.2 should ensure that the 'Chakra' script engine is used (requires IE9 or later) - select in the JScript panel configuration window (https://github.com/marc2k3/foo_jscript_panel/wiki/Configuration-Window)  (shift + right click).

If updating to JScript panel 2.0.1, existing panels will default to the JScript engine and so the 'chakra' engine has to be set.
Title: Re: Library Tree Discussion
Post by: Black_Over_Bills_Mothers on 2018-01-29 09:52:34
@WilB Thanks for the reply, it now works. However as you point out $swapprefix(%<band>%,A,The) doesn't actually work as I had intended. It now splits the muli-value tag band correctly but doesn't do anything with the prefix, they are ignored. Not nice.

Since this seems to be a limitation with foobar core/ColumnsUI I probably don't stand much chance of getting this fixed! So it occurs to me that it could be done within the JScript code itself. Just a thought!...

As usual thanks for your continued efforts on this panel, I couldn't do without it now.
Title: Re: Library Tree Discussion
Post by: eNforcer on 2018-02-20 00:13:22
Looking for a bit of help, I'm trying to sort my albums by year (old to new) but I keep messing it up.

Here's my filter:
Code: [Select]
Brad // %artist%|%album% $if(%date%,'['[%date%]']')|$if(%discnumber%,[Disc %discnumber%|%tracknumber%_%title%],[%tracknumber%_%title%])

(https://i.imgur.com/QcjM28J.png)
Title: Re: Library Tree Discussion
Post by: WilB on 2018-02-21 11:55:06
Sorting is by the view pattern. So the date has to be in front of the album. Try:

Code: [Select]
Brad // %artist%|['['%date%']' ]%album%|$if(%discnumber%,[Disc %discnumber%|%tracknumber%_%title%],[%tracknumber%_%title%])

I might add a $nodisplay{sort} parameter that can be used in the pattern. It will enable extra sorting without display of the sort item. Then you could just use that, and keep the displayed date after the album.
Title: Re: Library Tree Discussion
Post by: Black_Over_Bills_Mothers on 2018-02-21 12:20:16
@WilB
Sounds like a great idea. Could I use this to display in descending date order ie latest album first?
Title: Re: Library Tree Discussion
Post by: WilB on 2018-02-21 13:09:52
Yes. It all seems to be working on my copy & should be in the next release.
Title: Re: Library Tree Discussion
Post by: culinko on 2018-03-09 23:30:44
Found a small issue with Library Tree. I have the border of the panel hidden but when I switch to another song or play/pause the current one, the border of the panel flashes for a split second most of the time. It also happens when switching from another panel (e.g. Biography) to Library Tree. The easiest way to reproduce it is to spam play/pause for the current song with the panel open. For some reason I couldn't capture it on screenshot, though.
Title: Re: Library Tree Discussion
Post by: WilB on 2018-03-10 00:41:44
I couldn't see the issue using DUI or CUI with panel stack splitter.

Are using panel stack splitter? A flashing panel/border sounds as though it might be a panel stack splitter artefact. PSS usually re-runs all it's code on play & pause & on panel change as panel sizes alter. You have to be careful how to set up PSS layouts so they work cleanly. So if using PSS please ensure its not due to the construction of the layout, as it may have nothing to do with the Library Tree.  Fiddling around with positioning methods like $movepanel, custom background color (behaviour tab), use of $showpanel & force layout if it's in PSS may help.

If the issue persists which border do you mean? I don't understand how you see it flashing if it's hidden??? To try & reproduce I would need more info on the set-up, DUI vs CUI, exactly what the container is, e.g. PSS etc. May be a screenshot of the layout would help.
Title: Re: Library Tree Discussion
Post by: culinko on 2018-03-10 02:58:36
I am using Columns UI with PSS. Interestingly enough, this issue doesn't happen with the Biography script even though the PSS script for the background is literally the same for both:
Code: [Select]
$drawrect(0,0,%_width%,%_height%,$get_ps_global(bg.color),$get_ps_global(bg.color),)
If I check Forced Layout the panel is just blank.

I managed to record it with Fraps and uploaded the video to YouTube: https://www.youtube.com/watch?v=CVkfSB-1mig . You can use 0.25 speed and see how the border briefly flashes when switching to the next song.

Edit: I managed to crash the panel by right clicking in a specific spot somewhere on the top edge of the panel: https://i.imgur.com/KyAGSx2.png. My mouse cursor was exactly at the upper left edge of the right click dialogue. Reloading the panel fixes the error. I am not sure if it's a bug in Library Tree or in JScript panel. The error is the following:

Code: [Select]
Error: JScript Panel v2.0.6 (Library Tree v1.3.9.2 by WilB)
JavaScript runtime error:
Unable to get property 'rbtn_up' of undefined or null reference
File: <main>
Line: 1411, Col: 85
<source text only available at compile time>
Title: Re: Library Tree Discussion
Post by: WilB on 2018-03-10 11:17:46
The appearing borders seem as though they due to the default 5px PSS padding. I believe the issue is the way the layout is constructed and how PSS redraws on track change, etc. This doesn't look like an issue with library tree to me?

To test if it really is a library tree issue, try exporting the layout as an fcl file so you have a back-up. Then shift+right click library tree > configure. Choose tools > reset to default. You should then see the default JScript panel layout. If the problem persists then its not due to library tree.

It looks to me like the layouts drawing the panel twice: one time a bit smaller so the borders show. As a workaround reducing the padding to 0 may remove the issue. I suspect there is something different in how the bio panel is sized & positioned in PSS vs the method used for the library tree panel. There are several ways of positioning panels in PSS. Try exactly duplicating the method used for bio with library tree.

The other issue should be fixed for the next release.

HTH
Title: Re: Library Tree Discussion
Post by: culinko on 2018-03-11 15:07:56
Thank you so much, I managed to resolve the issue! Here's what I did in case someone else encounters a similar issue:

First I verified that it's not a Library Tree issue by resetting the JScript panel as you suggested and the issue still persisted. Then I removed the 5px padding from the panel which fixed the issue. However, the JScript panel with the Biography script also has 5px padding, so it had to be something else. Then I compared the settings for all PSS panels that I have and there were some inconsistencies in the behavior tab (custom background color, pseudo transparency, keep aspect ratio, enable per second checkmarks). After enabling "custom background color" and setting it to the color I use, the issue disappeared!

Again, thank you so much for the pointers, knowing where to dig does really help a lot :)
Title: Re: Library Tree Discussion
Post by: WilB on 2018-03-26 13:07:31
New Version: Library Tree 1.4 (https://hydrogenaud.io/index.php/topic,110938.msg954814.html#new)

CHANGELOG

ADD: Drag & drop (thanks to TheQwertiest & marc2k3).

CHG: Efficiency improvements due to implementation of new changes to JScript panel (thanks to marc2k3).
- faster initialization (typically 1.2-2X faster, depending on view)
- faster updates to tree when media library changes (typically 3-1000X faster depending on nature of update)
- much improved handling of tag-like database triggers (foo_playcount etc) that frequently call on_library_items_changed

ADD: Copy command to context menu + keyboard shortcut (CTRL+C) for copying items. Copied tree items can be pasted in playlists or other components. Thanks again to marc2k3 for new features that have enabled this.

ADD: $nodisplay{sort}. For use in view pattern. Enables use of extra sorting without display of the sort item. Example:
View by artist // %artist%|$nodisplay{$sub(99999,%date%)}['['%date%']' ]%album%|$nodisplay{%tracknumber%}[%track artist% - ]%title%
Albums will be sorted by DATE, latest first, with date displayed before the album.
Tracks will be sorted by %tracknumber%; %tracknumber% isn't displayed.

ADD: Hot keys for "Add to Playlist" & "Insert in Playlist". User assignable: right click > panel properties > "Hot Key...". They're likely to work best with "Playlist Autofill" off.

CHG: Some optimisations to key stroke navigation.

FIX: Now runs under both 'Chakra' & 'JScript' script engines. Use the 'Chakra' script engine if possible (requires IE9 or later) - its faster with this script. Set in the JScript panel configuration window (shift + right click).

FIX: Regression: stackoverflow issue.

As pointed out by the TheQwertiest, the previous version should have had more of a version bump due to the number of enhancements. That is now corrected.
Title: Re: Library Tree Discussion
Post by: WilB on 2018-03-26 17:48:06
New Version: Library Tree 1.401 (https://hydrogenaud.io/index.php/topic,110938.msg954848.html#new)

FIX: Regression: selection issue
Title: Re: Library Tree Discussion
Post by: Black_Over_Bills_Mothers on 2018-03-28 10:51:09
Hi WilB
I'm not that confident with my database search syntax but I've tried the following filter;

$meta(genre,0) IS Test

and it doesn't work. But;

%genre% IS Test


does work.

Am I doing something wrong?
Title: Re: Library Tree Discussion
Post by: jazzthieve on 2018-03-28 10:58:52
Does "$meta(genre,0)" IS Test work?
Title: Re: Library Tree Discussion
Post by: Black_Over_Bills_Mothers on 2018-03-28 11:19:42
Hi jazzthieve
Yes, the addition of speech marks fixed it. Thanks or your swift reply.
Title: Re: Library Tree Discussion
Post by: WilB on 2018-04-10 18:12:20
New Version: Library Tree 1.4.02 (https://hydrogenaud.io/index.php/topic,110938.50.html#msg955694)

ADD: $swapbranchprefix. For use in view pattern and with branching expressions. Enables swapprefix to be applied to each branch created from a multi-value field (@Black_Over_Bills_Mothers).
Syntax: $swapbranchprefix{%<field>%}
e.g. $swapbranchprefix{%<album artist>%}
Only change the field name. Specify prefixes to swap in panel properties: ADV.$swapbranchprefix ... (default prefixes: A + The).

ADD: Ability to set extra hot keys (@N4s7y):
- collapse all
- search (activates search if library tree has focus as that's needed for typing entries)
- search clear
User assignable: right click > panel properties > "Hot Key...". This change resets previous hot key assignments in panel properties.
*** ALWAY ENSURE COMMA "," SEPARATORS ARE RETAINED WHERE USED IN PANEL PROPERTIES ***

CHG: Optimisations: draw + sub-item counts handling.
CHG: Updated to use new "Query Syntax Help" path in foobar2000.
Title: Re: Library Tree Discussion
Post by: Black_Over_Bills_Mothers on 2018-04-17 07:45:08
@WilB
Just tried the new version and it's great! This script has everything I need to search and select from my library and it's quick. I have 169k tracks and it refreshes in less than 3 secs. I love the in-built handling of the swapprefix function - it works well.

Thank you for all your hard work on this script.
Title: Re: Library Tree Discussion
Post by: N4s7y on 2018-04-17 15:15:00
And thank you for adding those hotkeys. They work like a charm.
I'm really running out of complaints  ;)
Title: Re: Library Tree Discussion
Post by: Novatic on 2018-05-02 19:37:14
Hi,

I use CaTRoX (QWR Edition) theme and I have some trouble with long opera/classical tags: https://imgur.com/a/KRREcZ7
Would it be possible to fix this in a next update?

Thank you in advance.
Title: Re: Library Tree Discussion
Post by: WilB on 2018-05-03 17:37:36
I can't actually reproduce the issue, despite trying some very long tags, & so its not clear what the problem is. I note also that the CaTRoX playlist doesn't seem to have rendered correctly either (tracks 06, 08 & 10). So I wonder if its possibly something to do with the theme/underlying panel stack splitter handling??

Library tree uses a simple draw text function and that hasn't changed for ages, but it looks as though the text isn't being clipped correctly (i.e. no end ellipsis ...) for some reason.

It may be helpful to post some of the problematical opera/classical tags in case its some how due to the presence of certain characters etc.

To exclude a settings issue you could do the following. Right click library tree & choose panel properties. At the bottom choose export to ensure you have a back-up of panel properties. Then choose clear panel properties to reset to default to see if the issue persists.
Title: Re: Library Tree Discussion
Post by: Novatic on 2018-05-03 19:17:59
You are right about the playlist, the glitch is everywhere. I tried a proper portable installation without CaTRoX and got the same issue on Library Tree though.
I send you the folder in PM, would be great if you could find where it comes from. The problem appears when you check "View by Artist".
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2018-05-04 10:53:47
You are right about the playlist, the glitch is everywhere. I tried a proper portable installation without CaTRoX and got the same issue on Library Tree though.
That's really weird, I could not reproduce the issue neither in playlist nor in the Library Tree script. It seems that text clipping is broken in your player for some reason.
What OS are you using? Also please attach your component list (Preferences > Components > Copy report).

@WilB: should we move this discussion to https://hydrogenaud.io/index.php/topic,111060.msg954816.html ?
Title: Re: Library Tree Discussion
Post by: WilB on 2018-05-04 11:11:57
@Novatic: Thanks for the info sent.

The problematical tags are multi-line, e.g.

Maria Callas, Main Artist
Angelo Mercuriali, Featured Artist, Tenor Vocals
Tullio Serafin, Featured Artist, Conductor
Orchestra del Teatro alla Scala di Milano, Featured Artist, Orchestra
Coro Del Teatro Alla Scala Di Milano, Featured Artist, Chorus
Vincenzo Bellini, Composer

That is evident from their display in track properties: "Maria Callas, Main Artist (...)" or by pasting into a text editor (NOT notepad). Incidentally, CUI album list has issues with multi-line tag display/grouping.

The best solution, which will give maximum compatibility with other things, is to remove the line breaks from the affected subset of tags. To complicate things the track properties editor doesn't actually show the line breaks and shows the lines joined without an intervening space, like you get if paste the affected tags into notepad!

Alternatively, just the first line of a multi-line tag can be displayed:
View by Artist // $fix_eol(%artist%,)|$fix_eol(%album%,)|[[%discnumber%.]%tracknumber%. ][$fix_eol(%track artist%,) - ]$fix_eol(%title%,)

Currently library tree is displaying multi-line tags with line breaks, causing the overlap you see. That will be corrected in the next release, by setting it to single line mode. That should display the whole multi-line tag as a single line replicating the whole entry seen upon clicking it in track properties. If you don't fix the tags as above & don't want to wait until the next release:
Shift+right click library tree & choose configure.
Search for:
this.lc
There's only one match in the middle of line 347.
Change it to:
this.lc = DT_VCENTER | DT_SINGLELINE | DT_NOPREFIX | DT_END_ELLIPSIS;
Title: Re: Library Tree Discussion
Post by: WilB on 2018-05-04 11:15:59
@Novatic: I responded in main thread. See link above.
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2018-05-04 13:57:40
@WilB : could you share a problematic track please? I'd like to test it and fix my scripts as well =)
Title: Re: Library Tree Discussion
Post by: WilB on 2018-05-04 18:15:09
I've sent you a pm.
Title: Re: Library Tree Discussion
Post by: Novatic on 2018-05-04 21:07:59
Many thanks for the complete answer, I fixed my tags as you described. It looks good so far.
Title: Re: Library Tree Discussion
Post by: MojoBass on 2018-05-20 09:52:43
Hallo WilB,
Is there a chance for some kind of auto-fill functionality assigned to the 'next' and 'previous' command? I'd like to listen through an album by just clicking on one of the titles and go from there by 'previous' or 'next' without selecting specific titles.
Additionally, it would be great if the currently played song would somehow be indicated in the Library Tree view (e.g. by another background color of the title text or a rectangle around the title text etc).

Another question: when using your script and the JS Smooth Browser from Br3tt/marc2k3 in one skin, in my case the panel properties of both scripts are mixed in the same list (e.g. _DISPLAY... in the Library Tree Panel Properties). Probably this is not indended - just to let you know.

Thanks for the great scripts!

Title: Re: Library Tree Discussion
Post by: WilB on 2018-05-31 23:05:14
@MojoBass. 'next' and 'previous' commands are playlist commands. I did try implementing, but, perhaps unsurprisingly, that conflicted with playlist actions. You can achieve the behaviour by using the up/down arrow keys.

It is possible to highlight the playing track and I'll try and add something for the next version unless unexpected complications arise.

To avoid properties that are mixed, clear properties before importing new scripts else properties both from the original & new script will be present. That's just how JScript panel works, unless I've misunderstood your meaning. Importing new scripts doesn't automatically clear old properties.
Title: Re: Library Tree Discussion
Post by: MojoBass on 2018-06-03 05:10:53
Hello WilB,
thanks for the hint with the arrow keys, that works well for me!
For the intended behaviour, the option 'Play on Enter or Send from Menu' should be switched on.
Title: Re: Library Tree Discussion
Post by: RuKuKi on 2018-07-10 12:26:04
Hello WilB. Thanks for your great script!

Two questions:

it it possible to set the playlist name dynamically on creating (node name) (like in default album list component) when autofill is off
and is it possible to show folders before files (View by Folder Structure)
Title: Re: Library Tree Discussion
Post by: WilB on 2018-07-11 17:43:14
1) Set playlist name dynamically. Currently you can use SHIFT + right click > utilities > send to playlist. This a foobar2000 command that can be set to not require shift in foobar2000 preferences > context menu > utilities. This offers a likely playlist name or the option of editing it (works best if files are tagged). I didn't include a "Send to new playlist" command on the main menu because it can result in creating loads of different playlists that are cumbersome to then select or manage etc when simply re-clicking the tree item is much simpler + it auto-updates when the library changes. But it could be added...

2) View by folder structure uses a foobar2000 function that analyses relative paths & that doesn't display common elements of the path to give an easier to view presentation. It's the same as used in DUI album list etc & isn't user configurable. The view you require can probably be created with title formatting. Since this would likely lack the relative path handling bit how well it works may depend on the nature of your folder structure. I'm not sure that I fully understand what you want, but the following seems to be what you're asking:
Code: [Select]
View by Folder: File // $replace($directory_path(%path%),\,|): %filename%
As the above is path-based, put $nodisplay{%subsong%} on the end if you need tracks in containers like m-TAGS or cues sorted.
There maybe other ways if you look at foobar2000 title format help + also look at that if I misunderstood you.

As is usually the case you'll likely get maximum flexibility if views are created based on file tags...
Title: Re: Library Tree Discussion
Post by: Tropoje on 2018-07-24 20:20:58
Is the "Add to Current Playlist" option ? I can not find it or I'm blind :)
Title: Re: Library Tree Discussion
Post by: WilB on 2018-07-24 22:07:24
Right click over a tree item & it should be on the menu. The menu is context sensitive & so if the click isn't over an item, view options etc are shown instead.
Title: Re: Library Tree Discussion
Post by: Tropoje on 2018-07-25 06:25:22
Right click over a tree item & it should be on the menu. The menu is context sensitive & so if the click isn't over an item, view options etc are shown instead.
Of course, under the right click is this option. It's my fault because I did not express myself precisely. I was thinking about changing the behavior of the middle mouse button or changing the behavior of a double click on the selected item. Currently, I have not found such a possibility. I admit that this is a very helpful option and much faster than using the context menu  ;)
Title: Re: Library Tree Discussion
Post by: WilB on 2018-07-25 11:06:28
MiddleBtn can be set to add to the current playlist as follows.

Panel properties > Playlist Use: 0 or 1 > set: ...MiddleBtn,0

0 - uses the current playlist.
1 - uses a fixed "Playlist" that can be defined in panel properties (line above: default Library View).

Search the documentation for "Playlist:" if you need more info.

Drag n Drop is also now implemented & that can be used as well.
Title: Re: Library Tree Discussion
Post by: Tropoje on 2018-07-25 12:36:23
MiddleBtn can be set to add to the current playlist as follows.

Panel properties > Playlist Use: 0 or 1 > set: ...MiddleBtn,0

0 - uses the current playlist.
1 - uses a fixed "Playlist" that can be defined in panel properties (line above: default Library View).

Search the documentation for "Playlist:" if you need more info.

Drag n Drop is also now implemented & that can be used as well.
This is exactly what I was looking for. Works as expected  :D  Thank you very much
BTW
Where can I find documentation about "Playlist"?
Title: Re: Library Tree Discussion
Post by: WilB on 2018-07-25 12:47:44
Library Tree 1.4.0.2 Documentation.txt is included with the Library Tree download (https://hydrogenaud.io/index.php/topic,110938.50.html#msg955694).

Search it for "Playlist:" (minus quotes, but with colon) -> takes you straight to info.
Title: Re: Library Tree Discussion
Post by: MordredKLB on 2018-07-25 17:31:15
Hey WilB! I was wondering if I could have your permission to incorporate your LibraryTree into my Georgia theme. I've had a couple users ask for this functionality, so I figured I'd try and get the best :)
Title: Re: Library Tree Discussion
Post by: Tropoje on 2018-07-25 18:00:47
Library Tree 1.4.0.2 Documentation.txt is included with the Library Tree download (https://hydrogenaud.io/index.php/topic,110938.50.html#msg955694).

Search it for "Playlist:" (minus quotes, but with colon) -> takes you straight to info.
Oh, I forgot that the Documentation.txt file is attached to every zip file. Everything is clear to me now  ;D
Title: Re: Library Tree Discussion
Post by: WilB on 2018-07-25 19:03:15
@MordredKLB

Yes, using Library Tree in your Georgia theme is fine. Permission is granted.
Title: Re: Library Tree Discussion
Post by: seriousstas on 2018-08-08 09:28:23
@WilB
Can hope to create a new playlist in the future?
Now we have from Br3tt:
WSH Playlist Viewer 2013 - obsolete
JS Playlist - there is no support for smooth scrolling, there is no support for touch screens.
JS Smooth Playlist by Br3tt - no sorting by folders, no choice of Loved tracks (moods),
not optimized (requires a lot of resources when scrolling), design - requires the best..
Title: Re: Library Tree Discussion
Post by: mire777 on 2018-08-13 09:59:26
Is there some "playlist search" script? I don't need "library search", just script with search box, that can search active playlist and send results to #Playlist Search? Is something like this exist?
Title: Re: Library Tree Discussion
Post by: WilB on 2018-08-13 15:23:19
I don't have one and don't know if one exist. There's always foo_quicksearch?
Title: Re: Library Tree Discussion
Post by: mire777 on 2018-08-13 16:31:12
I don't have one and don't know if one exist. There's always foo_quicksearch?

Yes, but in script i can easily edit some things how I like..  Anyway thanks..
Title: Re: Library Tree Discussion
Post by: mjm716 on 2018-08-23 21:25:13
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<<
Title: Re: Library Tree Discussion
Post by: seriousstas on 2018-08-26 09:53:39
 my task  "Add to Current Playlist" via  hotkey.
Can someone help?
Title: Re: Library Tree Discussion
Post by: elia_is_me on 2018-08-26 12:30:13
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.
Title: Re: Library Tree Discussion
Post by: seriousstas on 2018-08-26 13:29:56
@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
Title: Re: Library Tree Discussion
Post by: WilB on 2018-08-26 17:39:17
@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.
Title: Re: Library Tree Discussion
Post by: seriousstas on 2018-08-27 11:26:13
@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.
Title: Re: Library Tree Discussion
Post by: seriousstas on 2018-09-01 23:51:05
All issues - resolved .
Title: Re: Library Tree Discussion
Post by: novaca on 2018-10-08 14:11:55
@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...)
Title: Re: Library Tree Discussion
Post by: WilB on 2018-10-08 15:34:22
See here. (https://hydrogenaud.io/index.php/topic,116669.msg962928.html#msg962928)

Since that post there have also been some new feature requests that need to be taken into consideration...
Title: Re: Library Tree Discussion
Post by: WilB on 2019-01-20 17:56:29
New Version: Library Tree 2.0.0 (https://hydrogenaud.io/index.php/topic,110938.50.html#msg967374)

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 (https://hydrogenaud.io/index.php/topic,116669.0.html) - 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.
Title: Re: Library Tree Discussion
Post by: always.beta on 2019-01-21 02:45:39
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
Title: Re: Library Tree Discussion
Post by: WilB on 2019-01-21 13:11:16
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.
Title: Re: Library Tree Discussion
Post by: Tropoje on 2019-01-25 07:06:32
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
Title: Re: Library Tree Discussion
Post by: WilB on 2019-01-25 11:49:07
New Version: Library Tree 2.0.1 (https://hydrogenaud.io/index.php/topic,110938.50.html#msg967656)

FIX: Tooltip issue.
FIX: Variable declaration.

Thanks for reporting.
Title: Re: Library Tree Discussion
Post by: Tropoje on 2019-01-25 16:57:10
@WilB
Thank you very much for your hard work. Now everything works like a charm :)
Title: Re: Library Tree Discussion
Post by: Tropoje on 2019-01-25 17:55:11
@WilB
Thank you very much for your hard work. After updating, everything works like a charm  ;D
Title: Re: Library Tree Discussion
Post by: seriousstas on 2019-01-26 12:34:41
Сan wait on JScript Panel 2.2.0 ?
Title: Re: Library Tree Discussion
Post by: Tropoje on 2019-01-27 16:42:19
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
Title: Re: Library Tree Discussion
Post by: WilB on 2019-01-27 18:18:27
New Version: Library Tree 2.0.2 (https://hydrogenaud.io/index.php/topic,110938.msg967776.html#new)

@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 (https://hydrogenaud.io/index.php/topic,116669.msg962909.html#msg962909) 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 (https://github.com/TheQwertiest/foo_spider_monkey_panel/wiki/JScript-to-SpiderMonkey-migration-guide) 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].
Title: Re: Library Tree Discussion
Post by: AndreaT on 2019-02-17 19:58:51
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
Title: Re: Library Tree Discussion
Post by: AndreaT on 2019-02-17 20:08:48
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
Title: Re: Library Tree Discussion
Post by: WilB on 2019-02-18 12:50:20
@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.
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2019-02-18 15:05:31
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.
Title: Re: Library Tree Discussion
Post by: AndreaT on 2019-02-18 18:17:04
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
Title: Re: Library Tree Discussion
Post by: WilB on 2019-02-18 19:18:12
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.
Title: Re: Library Tree Discussion
Post by: seriousstas on 2019-02-18 20:35:28
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" )
Title: Re: Library Tree Discussion
Post by: cgooey on 2019-04-02 22:37:19
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.
Title: Re: Library Tree Discussion
Post by: WilB on 2019-04-03 18:54:00
Thanks for the feedback. All requests implemented + sort issue fixed in my copy!

The new features should be in the next version.
Title: Re: Library Tree Discussion
Post by: Black_Over_Bills_Mothers on 2019-04-27 08:30:17
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.
Title: Re: Library Tree Discussion
Post by: Black_Over_Bills_Mothers on 2019-04-27 08:43:02
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.
Title: Re: Library Tree Discussion
Post by: Awesomeo on 2019-05-14 22:07:33
It could use %_view%, like the album list panel has, to generate different names of playlists based on current tree view.
Title: Re: Library Tree Discussion
Post by: nikosvault on 2019-05-25 22:58:26
Is there a way to get your playlist folders (with .fpl files) to show up in the library tree next to your music file folders?

My music folder...

https://i.ibb.co/XVnZ2Sf/1.jpg

and how it shows up in Foobar with Library Tree

https://i.ibb.co/ZhjK31C/2.jpg
Title: Re: Library Tree Discussion
Post by: WilB on 2019-05-28 12:20:06
@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 (http://www.foobar2000.org/components/view/foo_plorg).
Title: Re: Library Tree Discussion
Post by: Awesomeo on 2019-05-28 23:22:26
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): https://upload.wikimedia.org/wikibooks/ru/7/74/Foobar2000_album_list_panel.gif
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.
Title: Re: Library Tree Discussion
Post by: WilB on 2019-05-29 13:07:31
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.
Title: Re: Library Tree Discussion
Post by: Awesomeo on 2019-05-29 21:26:27
Thanks a lot for this!
Title: Re: Library Tree Discussion
Post by: WilB on 2019-06-10 12:40:20
New Version: Library Tree 2.1.0 (https://hydrogenaud.io/index.php/topic,110938.50.html#msg972268)

NEW: Various display improvements.
   - New node styles.
   - New highlight models (menu... > options > show).
   - Scrollbar now auto-minimises by default + has new look button icons. Behaviour & look can be set as previous on options > scrollbar menu.
   - New root node options, e.g. it can now be set as a summary item, e.g. All (132 artists), and in-lined.
    - Align right option for item counts.
NEW: Quick setup: Three node styles with different highlight models.
NEW: Improved search
    - Option to auto-send search results to playlist (menu > options > search).
    - Shortcut key to clear search results: "Escape".
    - Option to require pressing enter before searching (menu > options > search).
NEW: Target playlist can be set to use view name.
CHG: Various optimisations.
FIX: Reported issues.

Credit: kudos to Ottodix for inspiration in reworking certain aspects of the display format.

Updating. A number of minor panel properties will be reset. Export panel properties before updating if you want a record of previous settings.
Fresh installs will load the new look (can be changed on the Quick setup menu). Existing installs should retain the original look, except for the updated scrollbar.

Title: Re: Library Tree Discussion
Post by: Awesomeo on 2019-06-10 16:57:01
This is perfect. Thank you!
Title: Re: Library Tree Discussion
Post by: MojoBass on 2019-06-16 07:57:46
Hello WilB,
I still very much like your script, thanks for even further develiping this!
An issue I have with 2.1.0 is the following:
Up to 2.0.2 your script showed the full 'pattern tree' (as defined in Panel Properties/pattern such as artist/album/title) with the foreground colour defined in Preferences/Display/Columns UI/Colours and fonts/Colours for 'Foreground' at 'Inactive selected items' for the currently playing title, see first and second attachment.
I liked this feature very much, as it enabled that you can select an album and then flip though the titles with 'previous' and 'next', and still the currenty played title is indicated by the above defined foreground colour for the 'inactive selected items'.

Now this feature seems to have gone (see third attachment). Any chance to get back this or a similar behaviour?

Thanks, MojoBass
Title: Re: Library Tree Discussion
Post by: wirdjos on 2019-06-18 10:58:15
Hello,

Vanilla CUI filter component uses two playlists for browsing library: Filter Results for browsing and Filter Results (Playback) for playing. Is there a way to enable such behavior in Library Tree? Right now library browsing resets next track in current queue due to using only one playlist.

Also is there a hotkey for search via Library Tree or focus on its search bar?
Title: Re: Library Tree Discussion
Post by: WilB on 2019-06-18 16:42:38
@MojoBass
I've reinstated ...Show > Nowplaying in Highlight for the next version.

@wirdjos
A separate browse playlist shouldn't really be necessary with a tree viewer??? With a tree viewer you can browse by clicking nodes & so see the tracks that way within the tree view etc. Expanding nodes doesn't send items to the playlist, and so the next track in current queue shouldn't be reset. If you find that you inadvertently click on tracks, consider setting Single Click to "Select" & Double Click to "Send to playlist". By default middle clicking tracks adds them to the current playlist, and so can be used to queue tracks.

Extra hot keys are user assignable with the Spider Monkey panel index method.

1) Set Spider Monkey panel index number (1-10) for "search" by right click... > panel properties > "ADV.Hot Key..."
2) Go to foobar2000 preferences > keyboard shortcuts & assign that Spider Monkey panel index to a key or key combination.
3) Press key(s) to activate search. This activates search provided library tree has focus as that's needed for typing entries.
Title: Re: Library Tree Discussion
Post by: MojoBass on 2019-06-19 04:52:22
@MojoBass
I've reinstated ...Show > Nowplaying in Highlight for the next version.

@WilB: Thanks very much!!
Title: Re: Library Tree Discussion
Post by: nikosvault on 2019-06-22 23:06:41
I have forgotten how to add taps at the top of the panel. Can it be done in the panel properties menu?
Title: Re: Library Tree Discussion
Post by: WilB on 2019-06-27 16:04:10
If you mean Touch Control see menu > … Options > Mode
Title: Re: Library Tree Discussion
Post by: cgooey on 2019-06-27 21:34:33
Hey WilB,

Thanks for the changes you implemented in the latest update, they're really nice.

Currently when clearing the search box by clicking the X or hitting Esc, it will select an empty playlist. Could a option be added so that when you make a search and then click on an artists name, clearing the search will then populate the playlist with the artist that was selected? When clearing search without selecting an artist it could possibly select the summary item/root node, or the currently playing playlist instead.

Here's a video of the desired feature using Facets,
https://imgur.com/3EjcwAr

Thanks again.
Title: Re: Library Tree Discussion
Post by: nikosvault on 2019-06-28 19:38:32
If you mean Touch Control see menu > … Options > Mode

I was talking about the taps at the top of the JScript library tree. They are there when you first install the plugin.

Similar to like the ones you see below (now/lyrics/meta/library)....

https://blog.aquinzi.com/images/2013/foobar_tomorrow_library.png

Title: Re: Library Tree Discussion
Post by: anamorphic on 2019-06-29 12:13:46
^ They are Tabs - part of foobar DUI. Just add Tabs to your layout using Layout Editing Mode (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Layout_Editing_Mode) and place Spider Monkey / JScript Panel inside one.
Title: Re: Library Tree Discussion
Post by: nikosvault on 2019-06-29 16:27:10
^ They are Tabs - part of foobar DUI. Just add Tabs to your layout using Layout Editing Mode (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Layout_Editing_Mode) and place Spider Monkey / JScript Panel inside one.

Thanks. It was driving me crazy trying to figure it out!

And I never noticed my phone did Danish auto correct on that word. lol

Although I like that bugle call.
Title: Re: Library Tree Discussion
Post by: WilB on 2019-07-10 17:40:52
New Version: Library Tree 2.1.1 (https://hydrogenaud.io/index.php/topic,110938.50.html#msg973094)

CHG: Optimised Search Clear behaviour.
CHG: Reinstated option to highlight nowplaying (menu > ... options > show).
Title: Re: Library Tree Discussion
Post by: MojoBass on 2019-07-14 08:08:20
Hi WilB,
thanks very much for nowplaying highlightning!
Title: Re: Library Tree Discussion
Post by: Awesomeo on 2019-07-16 22:07:01
For the past month I've gathered a couple of wishlist items (ordered by personal priority) that I felt I could use the most. I know it's a long list and a lot to ask for, but I hope that at least some of these make sense to you and you'll consider implementing them at some point.

1. Formatting
I could really, really use the $rgb(baseline,hover,select) call. I'm not trying to turn my library tree into a christmas tree, I just need to make some subtle highlighting/dimming to discern between different tags displayed in one line. For example, under my view 'by label' I currently use {catalog number} Album Artist - Album [YYYY] · Source Media · It's a bit packed, I know, but that's where $rgb() would come in handy. This is how it looks now:

(https://i.imgur.com/BMCYxtK.png)

2. More external communication
This also concerns Spider Monkey Panel as a whole, because I saw it's got only 10 assignable indices. It would be really awesome to assign separate commands for all the views (and filters). It's not even about the hotkeys, I'd rather place a row of buttons above the filter (either via foobar toolbar or just drawn in panel stack splitter) to quickly switch between library tree views or to set up different filtering options. So essentially more robust capabilities for external interaction with the library tree.

3. Hide empty fields
CUI filter has the option to "show/hide items with empty labels". Now I have some tag fields that aren't populated for all of my library (like label or release series). So currently all the items with an empty %series% or %publisher% tag will get lumped at the top of the tree under a question mark with [1] item count. For now I've mitigated this by enclosing the whole view pattern with $if(%tag%,view pattern,'-'), but it's just a cosmetic fix.

4. Make keystrokes work locally when tree is in focus
Not sure if this is possible, but it's a little annoying issue, especially when it comes to spacebar. See, like in most players, I use spacebar as a play/pause toggle. So whenever I type some query in the library tree search field, it pauses playback in effect. It doesn't happen with foobar's library/playlist search, but yeah I assume that's because they're separate windows (?)

5. Headings / non-nodes
Ok, this one is a bit far fetched compared to the rest and it's just a whim. I just thought it would be great for the tree's clarity to introduce some kind of headings that would sort with the tree elements, but wouldn't be expandable nodes. The first place I could use these would be my 'by date' view:

(https://i.imgur.com/gtgtvbg.png)

I use decades as the top branch only to make the years view a bit tidier and clearer. But there's really no need to keep them as nodes. Sure, I could have them expanded at all times... except whenever I change the view, the state of the previous one resets.

PS
Another minor thing, there's "_Custom.Colour Frame Highlight" option but no "_Custom.Colour Frame Selected" and because of that I can't blend the selected item's frame with the bg.
Title: Re: Library Tree Discussion
Post by: WilB on 2019-07-19 12:43:02
1. Formatting. I couldn't find any tree or filter examples that offer the ability to set different colours for parts of a line, nor any case uses of your $rgb call??? The only sort of exception was facets which auto-dims text in parentheses or square brackets. There's also the highlight dim syntax (currently in DUI playlist) but I don't believe there is direct support for that in spider monkey panel.

It's actually quite complex to set different colours for different parts of a line of text. This plus the extra handling needed in various places, so all scenarios etc work, would increase the overhead. This post (https://hydrogenaud.io/index.php/topic,111060.msg961551.html#msg961551) about sums it up.

I'll consider adding something if spider monkey panel provides a direct function, e.g. a new (?) text draw function that supports the highlight dim syntax (currently in DUI playlist), or an alternative, that does all the colouring and text placement/sizing automatically, including ellipsis. This might now be possible due to enhancements in foobar2000 SDK, but I'm not sure. It would likely be generally useful.

2. External communication. Yes the current number of 10 would be rather limiting.

3. Hide empty fields. The current behaviour is the standard tree method, e.g. it's the same as DUI album list. I did try implementing, but it caused conflict with other node states. Working round the issues especially with parent nodes again adds to overhead & complicates things further. There are a couple of alternatives to consider.

Use $if2": e.g. $if2(%album%,Unknown)
Use filter: tag PRESENT; e.g. Album PRESENT // can be combined with other filters

4. Keystrokes. From the spider monkey panel documentation:

on_key_down(vkey); Note: keyboard shortcuts defined in the main preferences are always executed first and are not passed to the callback.

So essentially I can't do anything about this.

However, I did confirm that DUI album list & facets filter allow typing a space without triggering play/pause with that short cut key assignment. In spider monkey panel typing the space is completely blocked and you get play/pause. I'm not sure whether or not this could be changed in spider monkey panel.

5. Headings. "except whenever I change the view, the state of the previous one resets." That may be because "mode > auto collapse nodes" is enabled. Note that some Quick Setup options enable this mode.

6. Frame. I've added _Custom.Colour Frame Selected for the next version.

If you're inclined you may consider requesting items 1, 2 & 4 in the spider monkey panel thread.
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2019-07-19 13:11:12
1. I'll take a look whether fb2k API provides any such functionality.

2. I don't think I will change this - note that these are global, i.e. they can't be used by multiple scripts simultaneously (or more like it will trigger corresponding callback in EVERY script). Ideally there should be a different mechanism to assign global hotkeys, that could target specific scripts, but I'm not sure if it's achievable with the current fb2k API.

4. This comment means exactly what it says: SMP component does not receive a key event if it was handled by fb2k ('space' key down event in this case). So I can't pass to script (or suppress) what I don't have. You'll have to disable global 'space' shortcut if you want to use it in the scripts.
[EDIT] 4. Another alternative would be to use a popup to pass a string for searching.
Title: Re: Library Tree Discussion
Post by: Awesomeo on 2019-07-21 18:28:18
1.
Quote from: WilB
case uses of your $rgb call
Here's what I meant:
(https://ptpimg.me/2g1yeu.png)
It all boils down to aesthetic choices, but for me it makes a huge difference in readability. Another case use would be 'releases' branch under 'album artist' - I could dim a little everything that has %release type% as single, ep etc., so that full length albums would stand out by being a bit brighter.

Quote from: WilB
It's actually quite complex to set different colours for different parts of a line of text. This plus the extra handling needed in various places, so all scenarios etc work, would increase the overhead
Overhead for your code or for the speed of the tree on my side?
If it's the first, then sure, I understand. If it's the latter, then no worries, I don't think three or four $rgb() calls in my sub-label branch would slow down things at all:
Code: [Select]
$nodisplay{%date%}$nodisplay{%albumartistsortorder%}['{'%catalognumber%'} ']%album artist% - %album%' ['$year(%date%)']'[' ∙ '$meta(media type,0)['/'$abbr($meta(media type,1))]' ∙ ']
Honestly I've been conditionally formatting CUI playlists for years and they're all lightspeed fast even if I throw thousands of tracks at them. E.g. in my 'title' column I have recognition of extra-titular info like remix/instrumental etc. and additional highlighting of the remixer:
(https://ptpimg.me/860w1a.png)
Absolutely nothing about any CUI elements or SMP has ever been noticeably slow for me, no matter what I do (...unless I make calls to foo_customdb, but it's an old and slow extension in itself).

2.
Quote from: TheQwertiest
Ideally there should be a different mechanism to assign global hotkeys, that could target specific scripts, but I'm not sure if it's achievable with the current fb2k API.
I.e. scripts and particular properties within them. I mean, yeah, I feel like this is probably too much, but I think you agree that a mechanism for communicating between different panels/scripts would be a massively powerful tool: I could draw a button in panel stack splitter that would access particular SMP and change the property 'SYSTEM.View By' to a given value. And vice versa, I could have any PSS element that would react to changes in a particular SMP. So maybe something like $set_smp(smp_id,property,value) and $get_smp(smp_id,property).

3.
Quote from: WilB
Use $if2": e.g. $if2(%album%,Unknown)
Yeah, pretty much what I did, except I didn't really want to see the ones with empty fields, so I made it as unobtrusive as possible by wrapping the whole view pattern in a conditional. Like, you can see in that snap from my previous post, there's just a little hyphen at the top that has no item count (I could replace it with a zero-width space too or some exotic script character that would move it to the end of the list). Setting all filters to have additional 'PRESENT' is a good idea too, thanks.

4.
Quote
on_key_down(vkey); Note: keyboard shortcuts defined in the main preferences are always executed first and are not passed to the callback.
Hm, not sure if I fully understand this, because both things happen at once for me: playback pauses and the library tree search field receives a space.
However I've already checked other CUI panels with typing option, like 'Typefind' or 'Youtube Source Search' and keystrokes work locally in them, they don't execute foobar's global hotkeys. So I suppose they're somehow isolated, like pop-ups?

5.
Quote from: WilB
That may be because "mode > auto collapse nodes" is enabled.
Nope, I have it disabled. I can expand multiple nodes in, say, 'by date' view, change the view to 'by artist', then change back to 'by date' again and all the decades will be collapsed again. The panel doesn't remember tree state between views, it only remember it on closing/opening foobar.

6.
Thanks for this one!
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2019-07-22 11:28:43
[EDIT]: moved to SMP thread - https://hydrogenaud.io/index.php/topic,116669.msg973489.html#msg973489
Title: Re: Library Tree Discussion
Post by: WilB on 2019-07-27 18:13:33
@Awesomeo

Formatting. I've added the following:
Code: [Select]
$colour{normal,hover,selected}
Normal, hover & selected can either be r-g-b or a highlight or dim indicator. The latter are analogous to the DUI playlist highlight / dim method, except here they should also support hover & selected text, and I think will use +++, ++, +, -, --, ---. Either should enable setting different colours for parts of a line.

Remember tree state. I've added an option to remember tree state of all views independently (expanded nodes etc).

These should be in the next version (exact syntax of $colour might change), provided nothing unexpected arises during further testing etc.
Title: Re: Library Tree Discussion
Post by: Awesomeo on 2019-07-28 13:46:02
That's so great, thank you! This panel is heaven sent.
Title: Re: Library Tree Discussion
Post by: Awesomeo on 2019-09-20 14:06:43
Hey, I'm just wondering if you're still planning this update any time soon or whether you put this on hold for now? Sorry if I come off as nagging too much about it :(
Title: Re: Library Tree Discussion
Post by: WilB on 2019-09-20 18:34:38
There will be an update shortly with the new features indicated above (i.e. new colour handling [including setting different colours for parts of a line] and the ability to remember the tree state of all views independently etc). I was waiting to see if anything appeared in SpiderMonkey Panel v1.2.2 that was relevant to some of your other comments, and that would require attention, plus I was rather busy. But now SpiderMonkey Panel v1.2.2 is out...
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2019-09-20 20:41:56
@WilB, sorry, nothing relevant in this one =) (apart from bug fixes)
I'm planning to add new keyboard shortcut functionality, which will allow to assign global fb2k hot keys to panel specific actions, but it requires a lot of internal changes. Hopefully it will be ready for the next release.
Title: Re: Library Tree Discussion
Post by: WilB on 2019-09-25 13:20:15
New Version: Library Tree 2.1.2 (https://hydrogenaud.io/index.php?topic=110938.msg975702#new)

CHANGELOG

NEW: Option to remember tree state of all views independently (expanded nodes etc; menu > ... options > mode > Remember Tree State).

NEW: Colour options:

1) Option to set a custom colour for the selected item frame: _Custom.Colour Frame Selected (panel properties).

2) Option to set different colours for parts of a line of text:

$colour{normal,hover,selected}

For use in view patterns.

Normal, hover & selected can either be r-g-b or a highlight or dim indicator, e.g.
$colour{r-g-b,r-g-b,r-g-b} or $colour{-,++,+++}

Highlight & dim indicators:

- dim text
-- dimmer text
--- dimmest text
+ bright text
++ brighter text
+++ brightest text

All colours are optional: any undefined are set to default. Format, r-g-b & -/+ style, can be mixed in same $colour{} function.

Examples:
$colour{} reset all colours to defaults
$colour{255-0-0} set normal text colour to red; set hover & selected text colours to defaults since undefined
$colour{,,+++} set selected text colour to brightest; set normal & hover text colours to defaults since undefined
$colour{0-255-0,++} set normal text colour to green & hover text colour to brighter; set selected text colour to default since undefined
$colour{255-0-0,0-255-0,0-255-255} set normal, hover and selected text colours to red, green & cyan, respectively

Example pattern:
Code: [Select]
View by Artist - Album // $colour{-}%album artist%[$colour{+} - %album%][$colour{96-127-127} ∙ '['%date%']'][$colour{111-132-138} ∙ %genre%]$colour{--}|[[%discnumber%.]$colour{--,++,0-192-192}%tracknumber%. ]$colour{-,++,0-228-228}[%track artist% - ]%title%

Colours apply after the $colour code until either another $colour code is encountered or a branch point is reached (| in the view pattern).

Item counts are a special case. They don't form part of the view pattern.
   Align right: drawn separately; not controlled by $colour codes; already dimmed.
   End of text: effected by $colour codes. Use $colour{} at the end of the line [i.e. before branch point: | ]  to reset or set to a different colour if desired ($colour{--} is used in the example above).
Title: Re: Library Tree Discussion
Post by: Awesomeo on 2019-09-25 17:06:25
Thank you so much! I'm starting formatting right away.
Title: Re: Library Tree Discussion
Post by: Tropoje on 2019-09-26 18:45:30
@WilB
Perfect, Thank you :)







Title: Re: Library Tree Discussion
Post by: Tropoje on 2019-09-27 07:54:58
I don't know what the problem is, but when you hover over the song, the color does not change (in this case to yellow 255-255-0)

My test code:
Code: [Select]
Test colours // $colour{255-0-0,255-0-0,255-0-0}'('%date%')'$colour{} - %album%|%tracknumber%. $colour{255-0-0,255-255-0,0-255-255}%title%
normal
(https://i.postimg.cc/nLpQCkY7/normal.jpg)
hover
(https://i.postimg.cc/RVxKnKmM/hover.jpg)
selected
(https://i.postimg.cc/HLz85yBN/selected.jpg)

Title: Re: Library Tree Discussion
Post by: WilB on 2019-09-27 16:30:20
I tried your code sample, and it worked as expected for me, i.e. title showed in yellow on hover.

Please ensure the following is enabled: right click menu … > options > show > highlight text on hover.
Title: Re: Library Tree Discussion
Post by: Tropoje on 2019-09-27 17:14:34
Please ensure the following is enabled: right click menu … > options > show > highlight text on hover.
Yes indeed, the option you mention about was missing. Now everything works as it should. Once again, thank you very much for your work  :)
Title: Re: Library Tree Discussion
Post by: AndreaT on 2019-09-27 20:40:23
@WilB

Hello WilB, even with this last version I am getting this error:

Error: Spider Monkey Panel v1.2.2-preview+0db3c6a4 (Library Tree v2.1.2 by WilB)
OrderByRelativePath failed:
allocation size overflow

File: <main>
Line: 542, Column: 61

Stack trace:
  Panel/this.sort@<main>:542:61
  rootNames@<main>:1205:48
  Library/this.getLibrary@<main>:1190:119
  Timers/this.lib/<@<main>:2911:115

Regards,
Andrea
Title: Re: Library Tree Discussion
Post by: WilB on 2019-09-27 22:14:16
Ever since I realised you're using a very large library I've routinely run tests on an artificially created 640,000 library.

That works fine on my pc, including with view by folder structure.

The actual error seems to be in the handleList sort: handleList.OrderByRelativePath(); I'm not sure that I have any control over what that's doing, as it's a SpiderMonkey Panel function.

So it's not clear to me whether this is actually a SpiderMonkey Panel issue, possibly related to memory handling / memory available on your device, or whether something could be optimised in the script.

@TheQwertiest - any ideas?
Title: Re: Library Tree Discussion
Post by: Awesomeo on 2019-09-29 19:43:13
Works great and it made my information-overloaded branches much more readable: https://imgur.com/a/MjqhJVJ (at least to me). Thank you again!

One thing I noticed though, is that $colour{} function doesn't work inside other functions (conditional or string). For conditionals it outputs invalid syntax error, for $replace(%some_tag%,'some_string',$colour{x-y-z}'some_string') all sorts of weird breaks happen. I suppose that's intended not to work within functions?

In the end managed to get around it mostly and it's not such a big issue, but I was just wondering, because e.g. $nodisplay{} works within functions.
Title: Re: Library Tree Discussion
Post by: WilB on 2019-09-29 23:12:17
Yes I had spotted that one & it should be fixed on my copy. I'm awaiting to see if  @TheQwertiest can help with the issue raised in posts 231 & 232, before releasing an updated version.

But the fix is very minor, and you could change it yourself if you're inclined and don't want to wait until the next version. Shift + right click > menu > configure

On line 616 replace "," with "`" (2 instances on that line)
On line 1790 similarly replace ',' with '`' (1 instance on that line)
i.e. replace the commas on those lines with backticks. Do not alter any other lines.

I tested it with conditional strings, but please confirm it works with your conditional or string scenarios, if you want to try it, else advise me if you prefer to wait until the next version.

HTH
Title: Re: Library Tree Discussion
Post by: Awesomeo on 2019-09-29 23:57:14
Yes! Works like a charm:
(https://i.imgur.com/cFMWS9x.png)
Thanks again for so quick help!
Title: Re: Library Tree Discussion
Post by: Tropoje on 2019-09-30 06:36:25
But the fix is very minor, and you could change it yourself if you're inclined and don't want to wait until the next version. Shift + right click > menu > configure

On line 616 replace "," with "`" (2 instances on that line)
On line 1790 similarly replace ',' with '`' (1 instance on that line)
i.e. replace the commas on those lines with backticks. Do not alter any other lines.

I confirm, it now works inside the function. Earlier I had to add a square bracket to make it work. Thank you for the correction, it makes operation much easier  ;D
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2019-09-30 10:13:17
@AndreaT , does this happen on SMP v1.2.1 as well? Is it consistently reproducible? How big is your library (i.e. the number of tracks)?
Title: Re: Library Tree Discussion
Post by: Tropoje on 2019-09-30 13:03:17
Is it possible for the color to work inside the $replace function?
Code: [Select]
$if($or($strstr(%title%,feat.),$strstr(%title%,Feat.)),$replace(%title%,Feat.,$colour{128-255-0,128-255-0}feat.$colour{}),%title%[ '('$colour{128-255-0,128-255-0}feat.$colour{} %featuring%')'])
The second part of the code works (without the $replace function)
Code: [Select]
,%title%[ '('$colour{128-255-0,128-255-0}feat.$colour{} %featuring%')']

I don't know if it's possible to work around this  ::)
Title: Re: Library Tree Discussion
Post by: Awesomeo on 2019-09-30 13:42:22
@Tropoje $replace is case sensitive, but you can do it over infinite number of arguments, so just make replacements for both cases.

Code: [Select]
$if($or($strstr(%title%,feat.),$strstr(%title%,Feat.)),$replace(%title%,feat.,$colour{128-255-0,128-255-0}feat.$colour{},Feat.,$colour{128-255-0,128-255-0}Feat.$colour{}),%title%[ '('$colour{128-255-0,128-255-0}feat.$colour{} %featuring%')'])
Title: Re: Library Tree Discussion
Post by: Tropoje on 2019-09-30 14:39:06
@Tropoje $replace is case sensitive, but you can do it over infinite number of arguments, so just make replacements for both cases.

Code: [Select]
$if($or($strstr(%title%,feat.),$strstr(%title%,Feat.)),$replace(%title%,feat.,$colour{128-255-0,128-255-0}feat.$colour{},Feat.,$colour{128-255-0,128-255-0}Feat.$colour{}),%title%[ '('$colour{128-255-0,128-255-0}feat.$colour{} %featuring%')'])
Thank you very much for your quick reply  ;D
My goal is to always make changes Feat. (uppercase)  to feat. (lowercase). I have slightly modified your code and now it works as it should. This solves my problem  ;D  ;D  ;D
Code: [Select]
$if($or($strstr(%title%,feat.),$strstr(%title%,Feat.)),$replace(%title%,Feat.,$colour{128-255-0,128-255-0}feat.$colour{},feat.,$colour{128-255-0,128-255-0}feat.$colour{}),%title%[ '('$colour{128-255-0,128-255-0}feat.$colour{} %featuring%')'])
Title: Re: Library Tree Discussion
Post by: AndreaT on 2019-09-30 15:51:22
@TheQwertiest
@AndreaT , does this happen on SMP v1.2.1 as well? Is it consistently reproducible? How big is your library (i.e. the number of tracks)?

Yes, with SMP 1.2.1 I had to remove Library Tree immediately, it was completely unusable. No way to "start-up" Library Tree View.
With the new SMP 1.2.2 and the new Library Tree View things are going better, At least I can have it running for a while.
My library contains about 600k records (live recordings made over 30+ years).

PS: Nothing critical for me. No hurry. I already reverted back to Album List (it is slow, but it works).
Regards, Andrea
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2019-09-30 16:06:20
@AndreaT , answered in SMP thread.

PS: @WilB , sorry for the offtopic >_<
Title: Re: Library Tree Discussion
Post by: Awesomeo on 2019-10-03 00:42:41
1. I found a minor issue: Placing $colour{} function before the first string in top branch breaks the jumpsearch. If colouring is involved in conditional or replacement functions, jumpsearch works only for the unformatted alternatives.

2. Now for another thing that I'm not really hopeful about since it looks a bit like I'm asking for the impossible:

Pairing of corresponding meta fields between separate multi-value tags
Ideally I would love to be able to couple different multi-value tags in a way that evaluated corresponding indices of both arrays in tandem. So that branching would look like this:
- $meta(tag_a,0)$nodisplay{$meta(tag_b,0)
- $meta(tag_a,1)$nodisplay{$meta(tag_b,1)
...

How it looks now
Spoiler (click to show/hide)

At this point I gave up with disambiguating those few same-named artists I have, in order not to get these mangled branchings for much more ubiquitous multi-valued artist tags.
Title: Re: Library Tree Discussion
Post by: WilB on 2019-10-03 17:50:12
Jump search & $colour: should be fixed for the next version.

Pairing of corresponding meta fields between separate multi-value tags: multi-value tags & $nodisplay.

I did spot an issue with $nodisplay not always being correctly sorted with multi-value tags. That should be fixed for the next version It may address some of the sorting issues you noticed, but not the pairing point.

Pairing: multi-tag evaluation doesn't consider the indices that would be needed for that even for the displayed item (just getting the names is enough) let alone for anything that's not displayed.

Quote
disambiguating those few same-named artists

Personally I would find it rather confusing to have exactly the same named artist appearing in the list twice.

Possibilities:

1) Standard artist names. Album name, for example, can be a disambiguator, e.g.

Code: [Select]
View by Artist // %<artist>%|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
i.e. disambiguation would be based on album name after click on artist

Code: [Select]
View by Artist - Album // %<artist>% - %album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
i.e. album name alongside artist name

2) Artist name with disambiguator, including where it appears in multi-value tags. Doesn't depend on album names being present. For example:

Muse ∙ UK
Muse ∙ US

Disambiguator could be genre, country or city of origin etc. If a unique separator is used, artist names can easily be cut at the separator if used in internet look-ups of lyrics, biographies etc, so as not to break those types of look-ups.

Seeing as you say you only have a few same-named artists, it would be simple to change the tags if you're inclined.
Title: Re: Library Tree Discussion
Post by: Awesomeo on 2019-10-03 18:09:26
Yeah, I figured this is the easiest way. Or even to make an additional %artist_disamb% tag for these few cases, where I would have the name with more info, for example with the country code like you suggested. And then the branch would simply have a structure like this $if2(%artist_disamb%,%artist%).

Thanks for help!
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2019-10-05 15:20:11
I'm awaiting to see if  @TheQwertiest can help with the issue raised in posts 231 & 232, before releasing an updated version.
I don't think there is a need to wait for the new version of SMP, since even if this bug to be fixed, it should not impact SMP API in any way =)
Title: Re: Library Tree Discussion
Post by: Black_Over_Bills_Mothers on 2019-10-06 18:35:54
Hi
I'm seeing error as below when I use view: View by Album //$if(%album%,%album% - $meta(band,0), 'Non Album')|%title%

Error: Spider Monkey Panel v1.2.2-preview+0db3c6a4 (Library Tree v2.1.2 by WilB)
n is undefined

File: <main>
Line: 1683, Column: 6

Stack trace:
  branchCount/<@<main>:1683:6
  branchCount@<main>:1681:5
  Populate/this.buildTree/<@<main>:1667:156
  Populate/this.buildTree@<main>:1649:9
  Library/this.rootNodes@<main>:1276:58
  Timers/this.lib/<@<main>:2911:133
Title: Re: Library Tree Discussion
Post by: WilB on 2019-10-06 19:53:14
As I couldn't seem to reproduce, I've sent you a private message to explore what's going on.
Title: Re: Library Tree Discussion
Post by: zoumbro on 2019-10-07 05:37:22
Hi, I am facing the following problem when I start my foobar. It always crashes and I have to reload the panel to operate normally.
I am using SMP v .2.1. and Library Tree v2.1.0.

Thank you
Title: Re: Library Tree Discussion
Post by: WilB on 2019-10-07 12:51:45
@zoumbro

I'm not keen on debugging old versions of library tree because most releases have various bug fixes, possibly not always evident from the change log. I can't remember if there were any changes that might have affected this. It's also best to use the latest version of spider monkey panel.

In this particular case, it looks as though the library was updating since on_library_items_changed was called. Appearance of the abort message, I think, only has a short delay. From the stack trace, library tree was in the middle of updating the tree.

In general tree updates in response to library changes should be very rapid and occur in the background: only affected items in the tree are altered.

Aborting scripts part way through may give unpredictable results and a script error. What happens if you just let library tree continue and finish? If that's OK, perhaps choose don't ask me again & don't worry about it.

As a test I just tried changing 24,000 tags. All proceeded fine on my device in that scenario. There was no message.

Library Tree also has an option to switch off automatic syncing with the media library: panel properties: "ADV.Library Sync: Auto-0, Initialisation Only-1". If auto-syncing is off the library used by library tree will only be updated on initialisation, view change or through manual refresh on the menu.

I have seen the abort message on a number of occasions when it isn't really the script that's at fault, e.g. if windows is busy (e.g. updating) and necessary files can't be read from the hard drive in a timely way. Then scripts can stall at points difficult to predict and the message can appear.
Title: Re: Library Tree Discussion
Post by: always.beta on 2019-10-08 14:33:38
Without changing the font size, add line-height setting function?
Title: Re: Library Tree Discussion
Post by: WilB on 2019-10-08 22:24:06
See: menu … options > mode > line spacing

Enables line height to be padded as required. I think adding padding is more flexible than setting a fixed line height.
Title: Re: Library Tree Discussion
Post by: always.beta on 2019-10-09 01:44:23
See: menu … options > mode > line spacing
This is what I want. I'm sorry, I did not find it. thank you
Title: Re: Library Tree Discussion
Post by: AndreaT on 2019-10-17 17:21:26
@WilB

Hello WilB, even with this last version I am getting this error:

Error: Spider Monkey Panel v1.2.2-preview+0db3c6a4 (Library Tree v2.1.2 by WilB)
OrderByRelativePath failed:
allocation size overflow

File: <main>
Line: 542, Column: 61

Stack trace:
  Panel/this.sort@<main>:542:61
  rootNames@<main>:1205:48
  Library/this.getLibrary@<main>:1190:119
  Timers/this.lib/<@<main>:2911:115

Regards,
Andrea

@WilB
Hello WilB, any news about this?
I am still having this blocking error.
Regards, Andrea
Title: Re: Library Tree Discussion
Post by: WilB on 2019-10-17 18:54:23
As far as I am aware this seems to be a bug (https://hydrogenaud.io/index.php?topic=111060.msg976016#msg976016) in spider monkey panel and outside of my control, but I am open to suggestions. I just tried again with a 642K test library & all was OK here. That particular error seems to be occurring on panel initialisation and is explicitly related to view by folder structure. So you could try a different view (if the error is locking you out you could open panel properties and find SYSTEM.View By [it's probably the last entry] and change it to 1 to set a different view).

I thought you were debugging (https://hydrogenaud.io/index.php?topic=116669.msg976066#msg976066) the issue with @TheQwertiest? It sounds as though the issue is reproducible and so it ought to be possible to resolve the cause.

HTH
Title: Re: Library Tree Discussion
Post by: AndreaT on 2019-10-19 08:03:05
Hello WilB, thanks for caring about and for the new tips.
I already notified @TheQwertiest of the problem and he promised me a debugging version of SMP that I am still waiting for...
And, moreover, he wrote that the problem was looking to be related to your script...
Now, having your new feedback, I will go back to him again.
Many thanks and kind regards, Andrea
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2019-10-22 11:08:22
And, moreover, he wrote that the problem was looking to be related to your script...
I've never said such a thing though :\
The problem with `bad_alloc` in `OrderByRelativePath` is most likely a memory exhaustion problem. Theoretically, script could reduce memory usage by operating on smaller arrays or storing less data, but that would greatly increase complexity of the script.
Title: Re: Library Tree Discussion
Post by: AndreaT on 2019-10-24 20:18:11
@WilB and @TheQwertiest
Sorry for having misunderstood the matter ... I am not a developer... (:->)
Thanks for eventually find out a solution.
Library Tree is looking very nice and I would be glad to be able to use it.
Kind regards, Andrea
Title: Re: Library Tree Discussion
Post by: handleyman on 2019-10-28 09:06:01
Hi. I was using an old version of Library Tree with JS and it worked fine except that a Custom field I use %GEOGRAPHICAL% refuses to split multiple fields: some bands originate from more than one city/country, etc. The fields work fine everywhere else (they are originated in Mp3tag), and are separated by a <;>. So I just tested installed the new LT 2.1.2, but in this version, I cannot get the <Settings, View by> to save. I first tried importing an .wsp file (exported from the earlier version) and, although the new config shows in Panel Properties fine, they do not change in the options. It just shows the original config (ie: no View by Geog" shows. I then manually edited it, and it doesn't save. Is there something in the new version that I am missing? Many thanks for any help. Attached is the exported example.
Title: Re: Library Tree Discussion
Post by: WilB on 2019-10-28 09:55:15
It looks like you tried to import the JScript panel properties which isn't supported by the Spider Monkey Panel version of Library Tree (https://hydrogenaud.io/index.php?topic=111060.msg967377#msg967377). This has resulted in duplicate entries in panel properties and you changed the wrong one.

You need to clear panel properties to reset them. Then you should be able to enter, e.g.
Code: [Select]
View by Geog // %<geographical>%|[%album artist% - ]%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
Note that geographical in the view has to use the multi-value syntax as in the example to split multi-value tags. %geographical% will not split them.
Title: Re: Library Tree Discussion
Post by: handleyman on 2019-10-28 10:47:02
Brilliant, thanks! That got the new version working, but
<View by Geog // [%<geographical>%]>
 still doesn't split the tags, as  shown in this image...
Title: Re: Library Tree Discussion
Post by: WilB on 2019-10-28 11:09:23
I think that's actually to do with foobar2000 and not library tree.

Select a track. Open the properties of the track. Select the geographical field, right-click and choose split values. When confident it's working you can select multiple tracks.

foobar2000 also has an advanced setting in preferences: display > properties dialogue > multivalue fields.
You can add GEOGRAPHICAL to the list. That seems to help when creating new multivalue geographical tags through properties, but didn't seem to cause existing to be split. For that you have to use the above method.
Title: Re: Library Tree Discussion
Post by: handleyman on 2019-10-29 10:18:22
Brilliant! Thanks to your help, I have found the reason it isn't working:
In the fields with multiple values, I have used a space after the delimiter <; > (Australia: Cairns; England: Ellesmere Port). Removing the space <(Australia: Cairns;England: Ellesmere Port)> makes the field split fine, but it looks ugly! I wonder if there is there a way to force it to read <; > instead of <;> (ie. with the following space)??? Otherwise, I'll have to re-tag them all. Although that's fairly simple with Mp3Tag, it would force re-copying of so many files during backup, as there are thousands tagged this way!
Title: Re: Library Tree Discussion
Post by: WilB on 2019-10-29 11:07:48
I tried the following with the space after the ;
Australia: Cairns; England: Ellesmere Port
View by Geog // %<geographical>% splits the tag fine and displays correctly as in the picture.

However it was necessary to run the split values command as I said in my previous post. It looks like you didn't do that????? Select a track, open properties for the track, right click the geographical tag name and run Split values.... Once you know its working correctly you can do all music in one go in a few seconds. Much easier than retagging. Also see my comment in my previous post concerning display > properties dialogue > multivalue fields.

Also Library Tree now requires FontAwesome for proper display of symbols, and from your picture it looks as though it's not installed. There's a link to it in the Library Tree download location.

HTH
Title: Re: Library Tree Discussion
Post by: handleyman on 2019-10-29 11:25:48
Thanks. I did do that, yes, to test a few and it did work. Are you saying I need to do it every file which has multiple geog tags? And what then happens to new ones I add?
Title: Re: Library Tree Discussion
Post by: WilB on 2019-10-29 11:53:24
Thanks. I did do that, yes, to test a few and it did work. Are you saying I need to do it every file which has multiple geog tags?
Yes
And what then happens to new ones I add?
These are all general foobar2000 handling issues and not specific to library tree. It may depend on what tagger is used. You may need to split them...
Title: Re: Library Tree Discussion
Post by: handleyman on 2019-10-29 11:55:22
Thanks for all your help.  :D
Title: Re: Library Tree Discussion
Post by: AndreaT on 2019-11-08 14:59:24
@WilB
 
Hello WilB, today I was finally able to run Library Tree 2.1.2 ("special version").
Thanks to @TheQwertiest new method "OrderByRelativePathV2" requiring less memory and other SMP memory tuning, now Library Tree is running ... but it eats approximately 400 MB of RAM.
So, I know, it is just a matter of time and I will run out of memory again.

At this point, I have a 1 milion dollar question for you: does it is difficult to move all the libray dBase to an external SQL mini dBase and then from the SMP/JS just query this SQL?

Kind regards, Andrea
Title: Re: Library Tree Discussion
Post by: WilB on 2019-11-08 16:40:22
In the tests I've done library tree uses ~5 MB of memory per 10K of tracks:
library 2.5 MB + up to an extra 2.5 MB if a search returns all the library.

Values are based on using Spider Monkey Panel window.TotalMemoryUsage.

That seems quite low. But it's a question of scalability.

So:
10K library = ~5 MB
50K library = ~25 MB
100K library = ~50 MB
200K library = ~100 MB
600K library = ~300 MB

Actual values depend on complexity of patterns and could be a bit lower or higher. In the case of folder view it will depend on the depth of the folder structure and length of the folder names.

It seems your 600K library is using ~400 MB. I assume that's after searching. I wouldn't really expect it to go up much more. Spider Monkey Panel memory management has improved a lot in the more recent versions.

I don't know anything about use of SQL, so it would be a difficult task. Not sure if it would reduce memory use or not, since if it had to be read in before loading the library and doing a query it may not anyway.
Title: Re: Library Tree Discussion
Post by: WilB on 2019-11-08 18:08:25
New Version: Library Tree 2.1.3 (https://hydrogenaud.io/index.php?topic=110938.msg977222#msg977222)

NEW: $stripbranchprefix{X}. Adds ability to strip the prefix of all values in multi-value tags, e.g. $stripbranchprefix{%<artist>%}. Complements already present $swapbranchprefix{X}. Specify prefixes in panel properties: ADV.Prefixes to Strip or Swap ... (default prefixes: A + The). Note new property name. See documentation for more info.

CHG: Various optimisations.

FIX: Reported issues.
Title: Re: Library Tree Discussion
Post by: AndreaT on 2019-11-08 19:42:58
Many thanks, @WilB, for your kind reply.
All the best, Andrea

PS: I am going to install the new Library Tree 2.1.3...(:->)
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2019-11-08 19:58:57
PS: OrderByRelativePathV2 will replace the old one in the next SMP release (and nightly as well), so there will be no need to change anything in the script.
Title: Re: Library Tree Discussion
Post by: Tropoje on 2019-11-09 08:15:17
@WilB
Thank you for update  ;D

I have one question, what exactly is the font "FontAwesome" required for?
Title: Re: Library Tree Discussion
Post by: kode54 on 2019-11-09 10:26:59
FontAwesome is a symbols and logos font. Sadly, the latest and most feature filled versions of it are closed source, unlike older versions. I wonder if anyone maintains an open version with newer glyphs, developed independent of the original creator?
Title: Re: Library Tree Discussion
Post by: Tropoje on 2019-11-09 16:30:41
@kode54
Thank you for the explanation.
Title: Re: Library Tree Discussion
Post by: AndreaT on 2019-11-09 18:32:40
Hello @TheQwertiest, I installed the new Library Tree 2.1.3 using the last SMP beta you gave me directly.
With this beta I was testing the V2 method, however it can have the new LT 2.1.3 running fine with it.
Does this SMP beta you gave me implements both V1 and V2 in the V2 new mode?
Or am I just very lucky?
Regards, Andrea
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2019-11-09 18:54:09
You are just lucky =)
V2 was not merged in V1 yet on any SMP version.
Title: Re: Library Tree Discussion
Post by: Just_Addict on 2020-02-16 22:06:25
Regularly get a red "Aw, crashed :("  screen using 'No Filter' regardless of any selected View …

Pops up this...
Code: [Select]
Error: Spider Monkey Panel v1.2.3 (Library Tree v2.1.2 by WilB)
n is undefined

File: <main>
Line: 1683, Column: 6

Stack trace:
  branchCount/<@<main>:1683:6
  branchCount@<main>:1681:5
  Populate/this.buildTree/<@<main>:1667:156
  Populate/this.buildTree@<main>:1649:9
  Populate/this.buildTree/<@<main>:1669:37
  Populate/this.buildTree@<main>:1649:9
  Populate/this.buildTree/<@<main>:1669:37
  Populate/this.buildTree@<main>:1649:9
  Populate/this.buildTree/<@<main>:1669:37
  Populate/this.buildTree@<main>:1649:9
  Populate/this.buildTree/<@<main>:1669:37
  Populate/this.buildTree@<main>:1649:9
  Populate/this.branch@<main>:1591:9
  expandCollapse@<main>:2052:5
  Populate/this.lbtn_dn@<main>:2089:26
  on_mouse_lbtn_down@<main>:2928:188
Title: Re: Library Tree Discussion
Post by: always.beta on 2020-03-15 02:32:54
When the active playlist is an autoplaylist, the right-click menu of 'Send to New Playlist' is grayed out. Can it be modified to be clickable?
Title: Re: Library Tree Discussion
Post by: Candy Vinc on 2020-03-30 08:47:54
Hi!
First of all thank you for all of your effort and work!
Your tree is an essential element of my foobar! I'm really loving it :)!

As I updated last week your component, a sorting problem with the track numbers occured... and also releases with more than two discs do not display as usually.
I checked various other sources for this problem but it really seems to correlate with your component.
Propably it has something to do if someone uses one or two digit for tracknumbers.
To illustrate the problem; two screens!

I just overwrote the blank entry "Playlist: custom sort" in the properties with a sort order to my mind and now everything is fine!
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2020-03-30 11:28:49
Try using nightly version of foo_spider_monkey_panel, it might fix this issue.
Title: Re: Library Tree Discussion
Post by: Candy Vinc on 2020-03-30 11:55:25
Ah, yes!
Thank you! Now everything is like it was and should be!
Title: Re: Library Tree Discussion
Post by: fals33 on 2020-04-11 11:46:05
@Candy Vinc

glad too see a config that still use my playlist JScript viewer ;-)

(i'm just visiting since a long time...)
Title: Re: Library Tree Discussion
Post by: mjm716 on 2020-04-11 13:29:47

(i'm just visiting since a long time...)

Great to see you back! I hope this means you have some new treats in store?! :D

Your script was ported to SMP panel as well, but could use your touch.
Title: Re: Library Tree Discussion
Post by: Falstaff on 2020-04-11 14:06:25
Quote
Your script was ported to SMP panel as well, but could use your touch.

just get back my true account :) ...

I'd like to give a look at this SMP panel, could you tell me where to get the port of my playlist script to this panel please, just to see what is to migrate from JScript Panel and win some time ?
Title: Re: Library Tree Discussion
Post by: mjm716 on 2020-04-12 06:52:05

I'd like to give a look at this SMP panel, could you tell me where to get the port of my playlist script to this panel please, just to see what is to migrate from JScript Panel and win some time ?

Just install SMP and you will find it in the Samples folder: foobar2000\user-components\foo_spider_monkey_panel\samples

already looking forward to modding my layout! ;)
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2020-04-13 09:59:56
@Falstaff , latest versions of all your (ported and modified) scripts can be found here (in folders `jsplaylist-mod` and `js-smooth`): https://github.com/TheQwertiest/foo_spider_monkey_panel/tree/master/component/samples

Sorry for the offtop, WilB.
Title: Re: Library Tree Discussion
Post by: WilB on 2020-04-29 12:58:17
@always.beta
I've fixed the issue of 'Send to New Playlist' being grayed out when active playlist is an autoplaylist, for the next version.
Title: Re: Library Tree Discussion
Post by: WilB on 2020-04-29 16:25:18
^ That report is for v2.1.2. The issue should be fixed in the current version (v2.1.3).
Title: Re: Library Tree Discussion
Post by: angriestchair on 2020-06-02 23:20:37
This performs incredibly fast. Changing settings is a hassle though, lots of right clicking and navigating through context menus. A settings dialog box would be way better if possible.

One of the other problems I'm having is how I'd like to split these branches. I have the Columns UI Library Tree (http://foo2k.chottu.net/#lt) which works closer to how I want. Still not completely and it's abandoned anyway. It allows me to create multiple views that can all be seen at once instead of having to change views. I've attached a screenshot of what I mean. Genre/Subgenre, Tagging, and Library are all views I've created. Can this be done with this? I'm also trying to make a view that splits my top level branches as:
Code: [Select]
>Artists
    *Artist1
    *Artist2
>Albums
    *Album1
    *Album2
but this is the part I couldn't figure out in the one I linked either.
Title: Re: Library Tree Discussion
Post by: osenboz on 2020-06-16 10:45:56
Thanks for this very nice script!
It works really well, however I've noticed that there seems to be an issue with sorting in "View by Folder-Structure" (using v2.1.3):
 
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2020-07-14 22:59:23
@WilB , I've added your scripts to the showcase page: https://theqwertiest.github.io/foo_spider_monkey_panel/docs/script_showcase/single_panel_scripts/#biography

Feel free to ping me if you want to add any additional description (like >here< (https://theqwertiest.github.io/foo_spider_monkey_panel/docs/script_showcase/single_panel_scripts/#send-to-formerly-external-player-modoki)) and/or screenshots.
Title: Re: Library Tree Discussion
Post by: Tropoje on 2020-07-24 10:55:45
@WilB
I found an annoying error in the script (I think so). If the tag field name contains the character ⧸ it automatically gives a pause to the tag (see screen). If instead of ⧸ I use / this problem does not occur.

My sample code
Code: [Select]
[ ($and($meta(LABEL),$meta(CATALOG NUMBER)),'['%LABEL% %CATALOG NUMBER%']',$if2(['['%LABEL%']'],['['%CATALOG NUMBER%']']))]

Library Tree 2.1.3
Please take a look at it
Title: Re: Library Tree Discussion
Post by: WilB on 2020-07-27 10:55:36

@osenboz

I suspect its because the track number isn't padded in the filename.
i.e. they're 1, 2, 3, 10, 11 etc as opposed to 01, 02, 03, 10, 11 etc
I could see the issue. DUI album list behaves the same way.

The order is determined by OrderByRelativePath() which I have no control over.

%tracknumber% that's used in view by album automatically pads.

Library Tree also does a display sort for displayed text strings which has full numeric handling and so all displays in the actual tree correctly. But using that string sort on the whole library instead of OrderByRelativePath() doubles the initialisation time and likely wouldn't be compatible with the condensed style that OrderByRelativePath() produces.

I always pad track numbers in filenames.

@TheQwertiest

Thanks. It looks nice!
Title: Re: Library Tree Discussion
Post by: WilB on 2020-07-27 11:12:48
@angriestchair

As far as I am aware dialogue boxes aren't an in built feature of Spider Monkey Panel. So they would need coding from scratch which is a lot of effort. If there was some generic code that could be used may be in due course.

The next version will have a settings button which may help.

Sorry but the other feature isn't supported.

@Tropoje

Sorry but looking at your picture I can't see what the problem is. I tried that character quickly and all seemed OK.
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2020-07-27 11:13:28
@osenboz , @WilB , it looks like an old bug that was fixed in SMP v1.3.0: https://theqwertiest.github.io/foo_spider_monkey_panel/docs/changelog/#fixed-1
I.e. just update SMP to the latest version and all will be fine.
Title: Re: Library Tree Discussion
Post by: WilB on 2020-07-27 11:17:19
Well I reproduced it with 1.3.1 beta...
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2020-07-27 11:18:09
@WilB , you can use HTML to create dialog boxes via ShowHtmlDialog (https://theqwertiest.github.io/foo_spider_monkey_panel/assets/generated_files/docs/html/utils.html#.ShowHtmlDialog). Of course, one would still need to write the whole dialog, but it is much easier (IMO) than doing it through ActiveX.
Title: Re: Library Tree Discussion
Post by: WilB on 2020-07-27 11:30:33
If there was some generic code that gives a nice tabbed dialogue box, so one can easily just changes the entries  in a manner analogous to panel properties then may be.

For the time being I suspect that the new settings button in the next version will suffice.
Title: Re: Library Tree Discussion
Post by: TheQwertiest on 2020-07-27 11:49:54
@WilB, osenboz's problem was the following: 10, 11 ... 20, 21 was sorted as 10, 20, 11, 21 ..., which was caused by a bug in SMP v1.2.3 that resulted in the first character of path to be ignored during sort.
`OrderByRelativePath` (bugs aside) uses the same algorithm as Windows file explorer (hence the usual 1, 10, 11... problem).

[EDIT]: Judging by the bug report, osenboz actually has a proper padding for track numbers, so they won't be affected by Windows sorting problem either =)
Title: Re: Library Tree Discussion
Post by: MordredKLB on 2020-07-27 21:23:53
If there was some generic code that gives a nice tabbed dialogue box, so one can easily just changes the entries  in a manner analogous to panel properties then may be.
I'm gonna be tackling that idea very shortly, but no promises on the results. The biggest issue will be dynamic sizing of the dialog which may not be possible.

Honestly might be better to just start with some text/checkbox style controls and just draw them in an on_paint. That gives the most flexibility. but also involves the most coding. You've already done some of that work with your search input, so I might go down that route for a bit and see where it leads, if the HTML stuff proves to be too much of a pain.
Title: Re: Library Tree Discussion
Post by: osenboz on 2020-07-29 22:26:31
@TheQwertiest @WilB
Thanks a lot for your updates! (since my file-namings are properly padded, updating to SpiderMonkey Panel v1.3.1 solved the problem!)
Title: Re: Library Tree Discussion
Post by: ubercow on 2020-08-07 15:15:16
Thank you for this component, it's very fast! I love the now playing filter feature.

Feature idea/request: allow specifying multiple tags at the same branch level that will create multiple entries. This is a feature of Facets. For example the first tree level could be %<artist>%OR%<album artist>%, where OR is some divider. Then under the The Beatles node, for example, you will see albums where album artist = The Beatles, and also any tracks where artist=The Beatles from other albums (without duplicate entries where album artist == artist == The Beatles)
Title: Re: Library Tree Discussion
Post by: WilB on 2020-08-10 12:49:44
@ubercow

Quote
Thank you for this component, it's very fast! I love the now playing filter feature.

Feature idea/request: allow specifying multiple tags at the same branch level that will create multiple entries... For example the first tree level could be %<artist>%OR%<album artist>%, where OR is some divider. Then under the The Beatles node, for example, you will see albums where album artist = The Beatles, and also any tracks where artist=The Beatles from other albums (without duplicate entries where album artist == artist == The Beatles)

I've added a soft splitter to my copy that should do what you want. It should be in the next version unless anything unforeseen arises.

It seems to work very well, and for example in a simple form also allows combining album artist & artist style views into a single view:

%album artist%¦%artist%

1) Tracks on compilations are kept together by grouping under Various Artists
2) Artists on compilations also display under the artist name

Both display on the same level.

[moved discussion to correct location]
Title: Re: Library Tree Discussion
Post by: anamorphic on 2020-08-11 15:16:09
^ My favorite feature from Facets. This is brilliant! Thanks WilB. :)

Would it work with splitting multi-value tags?  %<genre>%|%<style>% (using the angled brackets)
Title: Re: Library Tree Discussion
Post by: WilB on 2020-08-11 17:00:03
Yes
Title: Re: Library Tree Discussion
Post by: huggy020 on 2020-11-19 18:11:04
@WilB
I am using Eole app with with a lot of customizations which makes it difficult to just update without a lot of work. My problem is something like  $replace($directory_path(%path%),\,|)|%filename_ext% dont work. Could you post that part of your code that changed from about v1.3.3 to v1.3.6 to make it work. Thanks
Title: Re: Library Tree Discussion
Post by: huggy020 on 2020-11-27 16:38:29
@WilB
I am using Eole app with with a lot of customizations which makes it difficult to just update without a lot of work. My problem is something like  $replace($directory_path(%path%),\,|)|%filename_ext% dont work. Could you post that part of your code that changed from about v1.3.3 to v1.3.6 to make it work. Thanks

Nevermind I found it
Title: Re: Library Tree Discussion
Post by: wcs13 on 2020-12-01 00:54:28
Hi @WilB , testing Library Tree right now :)
So far so good, but I have noticed a glitch maybe :
In Panel Properties, if I change _CUSTOM COLOURS/FONTS : USE from False to True, all results disappear, regardless of what I put in _CUSTOM COLOURS/FONTS : EMPTY = DEFAULT (e.g. 255-0-0). Playing a new track doesn't solve the issue.

My goal would be to keep the same font, but change its color and make it bold instead of regular. Is that possible ?
Also, I would like to know if I can rename the "All Music" to something else. Thanks !
Title: Re: Library Tree Discussion
Post by: MojoBass on 2021-01-04 07:32:19
@WilB don't know if you saw the note from @snotlicker on known issues at JScript Panel V2.5.0 b4 with Library Tree (see here (https://github.com/marc2k3/foo_jscript_panel/releases)). Any chance to still maintain Library Tree as well for JScript Panel (e.g. for Georgia)?
Title: Re: Library Tree Discussion
Post by: marc2k3 on 2021-01-04 09:11:55
Georgia is being updated for SMP so you should wait for that.

Since it's a single panel layout, it's not trivial to integrate any updated version of Library Tree in to it. The developer of Georgia won't do it and no one else would know how even if they wanted to. It's very complex as opposed to going in its own panel. Another aspect of it being single panel is that you simply don't need the latest version of JSP. If you don't have the skills to read the changelog/breaking changes wiki page and fix it yourself, you're not going to gain anything else from running the latest version.

edit: I've attached a fixed version for Georgia which goes in js\CaTRoX_QWR

I'm not fixing the standalone version because the SMP version is far superior. It's one of the few scripts that actually benefits from the faster internals provided by the Mozilla JS engine and I believe its sorting mechanisms have been optimised as well. Since JSP now requires Windows 7 like SMP does, there is no reason not to use it.
Title: Re: Library Tree Discussion
Post by: MojoBass on 2021-01-05 06:12:15
@snotlicker: thanks very much!!
Adapted 2 lines, 2558:
Code: [Select]
n = lib_manager.node[pos][l]; else
and 3672:
Code: [Select]
p.pos = get_pos; else
now seems to run stable on JSP 2.5.0 b4 including embedded Library Tree. Shows only CD art in my case, but for now that is great for me!
For stand-alone Library Tree, I am already on SMP.
Thanks again for continuously developing JSP!
Title: Re: Library Tree Discussion
Post by: WilB on 2021-02-08 12:11:47
Yes I have JSP compatible version done. It should be released in the next round of script releases.
Title: Re: Library Tree Discussion
Post by: WilB on 2021-02-08 12:22:24
It should work. I tested & it seemed fine.

All the custom handling has changed in the next version anyway & so it will be much easier to change.

Options > root node > view name enables use of the 'view name' which is configurable. Again all this will be much easier in the next version.
Title: Re: Library Tree Discussion
Post by: wcs13 on 2021-02-08 18:26:21
All the custom handling has changed in the next version anyway
Let's just wait for the next version then, no worries. Any ETA ?
Title: Re: Library Tree Discussion
Post by: marc2k3 on 2021-02-08 20:25:43
You really shouldn't bother with a JSP version. As mentioned a few posts up, newer versions of JSP require windows 7 just like SMP so all users of your scripts should be on SMP by now. Even the Georgia theme has a SMP version now (currently beta but should be released fully soon).

Title: Re: Library Tree Discussion
Post by: Black_Over_Bills_Mothers on 2021-02-19 08:38:08
Just had this script crash (see below). I'm using 1.4.2 of SMP.

Error: Spider Monkey Panel v1.4.2-dev+5fa2496a (Library Tree: Library Tree v2.1.3 by WilB)
lib.node[v] is undefined

File: Library Tree 2.1.3.js
Line: 1635, Column: 11
Stack trace:
  Populate/this.buildTree/</<@Library Tree 2.1.3.js:1635:11
  Populate/this.buildTree/<@Library Tree 2.1.3.js:1634:23
  Populate/this.buildTree@Library Tree 2.1.3.js:1628:12
  Populate/this.buildTree/<@Library Tree 2.1.3.js:1647:42
  Populate/this.buildTree@Library Tree 2.1.3.js:1628:12
  Populate/this.branch@Library Tree 2.1.3.js:1570:14
  expandCollapse@Library Tree 2.1.3.js:2012:10
  Populate/this.lbtn_dn@Library Tree 2.1.3.js:2049:26
  on_mouse_lbtn_down@Library Tree 2.1.3.js:2889:192
Title: Re: Library Tree Discussion
Post by: WilB on 2021-02-20 12:50:31
I wasn't able to reproduce the issue. You can try replacing lines 1632-1639 with the following, which ought to fix it.
Code: [Select]
switch (true) {
case l != -1 && !showTracks:
range(item.item).some(v => {
if (lib.node[v] && (lib.node[v].length == l + 1 || lib.node[v].length == l + 2)) return item.track = true;
});
break;
case l == 0 && lib.node[item.item[0].start] && lib.node[item.item[0].start].length == 1: item.track = true; break;
}
Else the fix will be in the next version.

Thanks for reporting.
Title: Re: Library Tree Discussion
Post by: Lucidae on 2021-02-21 06:48:34
Not sure if it's feasible, but a reverse sorting function specifically for the date field would be nice. I wish to be able to sort albums chronologically in order of newest to oldest.
Title: Re: Library Tree Discussion
Post by: WilB on 2021-02-21 11:02:45
You can use $nodisplay:

$nodisplay{X} Sorts & groups by X without display of X

For example, the following sorts latest albums first & displays the date.
Code: [Select]
%artist%|$nodisplay{$sub(99999,%date%)}%album%[ '['%date%']']|%tracknumber%. %title%
The next version has embedded extended syntax help + a proper manager for views & filters, so doing things like this should be easier. It should also satisfy requests for integrated thumbnail support and is planned to include an optional 2 panel mode...
Title: Re: Library Tree Discussion
Post by: Lucidae on 2021-02-21 13:29:06
You can use $nodisplay:

$nodisplay{X} Sorts & groups by X without display of X

For example, the following sorts latest albums first & displays the date.
Code: [Select]
%artist%|$nodisplay{$sub(99999,%date%)}%album%[ '['%date%']']|%tracknumber%. %title%
The next version has embedded extended syntax help + a proper manager for views & filters, so doing things like this should be easier. It should also satisfy requests for integrated thumbnail support and is planned to include an optional 2 panel mode...

Thanks very much! I wasn't aware of such a syntax. Looking forward to the next version.
Title: Re: Library Tree Discussion
Post by: wcs13 on 2021-03-10 15:22:54
No reply yet, but here's a new question about Library Tree. This code doesn't seem to work as a custom filter :

Code: [Select]
$nowplaying{$meta(comment,0)} HAS artist

@WilB , could you tell me why it doesn't work?
The goal would be to find other tracks where the artist would be mentioned in the %comment% field of the current playing track.
That's because some of my tracks have a %comment% field that says : "This track has a small sample taken from this other track : ARTIST / TITLE".
In that case I'd like Library Tree to help me fetch that other track.
Title: Re: Library Tree Discussion
Post by: culinko on 2021-03-13 19:29:23
Hi WilB,

Thanks for the wonderful script, I appreciate that you are still maintaining it for such a long time :)

I just updated from JScript panel to Spider Monkey Panel and was able to set it up the way it was before. However I have encountered 2 minor issues that I'd like to report/get some clarification for, so I am listing them below:

1. I might be wrong, but i think the setting "options / mode / auto expand single items" doesn't work right now or i have misunderstood this setting. It seems like it is changing the setting "full line selection" setting instead because if I change "auto expand single items" setting, it will enable/disable both of these settings instead.

2. I have a question regarding the "options / node style / highlight nodes on cover" setting.

Currently, if the setting is enabled, the mouse cursor changes to hand symbol when hovering over node text and the mouse cursor stays as default when hovering over the node symbol. When the setting is disabled, the behavior gets reversed, so the mouse cursor stays as default when hovering over the node text and changes to hand symbol when hovering over the node symbol.

Would it be possible to change this behavior so when this highlight setting is enabled, the mouse cursor changes to hand symbol for both the node symbol and the node text and when this setting is disabled, the mouse cursor will not change for neither the node symbol and the node text?

My goal is to disable the mouse cursor changing to hand symbol entirely, for both the node symbol and the node text.

Thank you for your feedback, much appreciated!
Title: Re: Library Tree Discussion
Post by: WilB on 2021-03-31 17:16:36
1. That's a bug fixed for the next version. It's a trivial fix: there's a break missing in the menu handler on the end of line 2837.

2. That was a design decision so there's always a visual hover indicator. If you want to change the behaviour, you can try searching the script for:
this.hand = true
change to:
this.hand = false
There should be two instances.
Title: Re: Library Tree Discussion
Post by: WilB on 2021-03-31 17:25:11
Try:
Code: [Select]
comment HAS $nowplaying{$meta(artist,0)}

I don't have a definitive eta. All release scripts have had a significant upgrade. Ini file has gone from bio plus all scripts now have proper settings dialog. Additionally, there's a bunch of new features mostly eluded to here or there. Code changes are mostly done now. Code clean up and testing needed tho...
Title: Re: Library Tree Discussion
Post by: culinko on 2021-04-01 16:32:45
Thank you, changing the value to "false" in line 2124 did the trick :)
Title: Re: Library Tree Discussion
Post by: WilB on 2021-05-18 17:17:01
New Version: Library Tree

v2.2.0-Beta.1 (https://hydrogenaud.io/index.php?topic=110938.msg997853#new)

HIGHLIGHT
Now supports all types of album art including artist photos & album covers

(https://i.imgur.com/4uIiuks.png)
 
Updated features summary
- Tree viewer + album art support.
- Library and playlist sources.
- Single panel and two panel modes.

Changelog v2.2.0
Added
- Album art
- Playlist source
- Two panel mode (optional)
- '¦' soft splitter that combines different fields into same branch level, e.g.
   %album artist%¦%artist% or %<album artist>%¦%<artist>%
- New options dialog

Changed
- Send to new playlist now checks playlist lock status
- Smooth scroll: enhanced smoothness when using scrollbar
- Refactored code

(https://i.imgur.com/wdm9CRl.png)
Title: Re: Library Tree Discussion
Post by: Black_Over_Bills_Mothers on 2021-05-19 07:32:50
@WilB
Nice new version. Thanks.

Having a problem with updating a playlist that has ONLY the disable remove playlist lock. It doesn't update until I remove all locks. I would have thought that the playlist should update - as far as the user is concerned it's not being removed, it's being updated. But it's no big deal, I'm sure we can live with it.
Title: Re: Library Tree Discussion
Post by: Black_Over_Bills_Mothers on 2021-05-19 08:14:01
@WilB
Nice new version. Thanks.

Having a problem with updating a playlist that has ONLY the disable remove playlist lock. It doesn't update until I remove all locks. I would have thought that the playlist should update - as far as the user is concerned it's not being removed, it's being updated. But it's no big deal, I'm sure we can live with it.

Sorry originally posted in wrong thread.
Title: Re: Library Tree Discussion
Post by: marc2k3 on 2021-05-19 09:35:32
Currently, SMP only has plman.IsAutoPlaylist and plman.IsPlaylistLocked which both return booleans and is unable to determine the type of locks in place.

It inherited these from JSP during the original forking process long before JSP had a more finely grained method plman.GetPlaylistLockFilterMask added which is able to determine the different types of lock in place.

Maybe the script should check for plman.IsAutoPlaylist instead. They're guaranteed to be read-only and any attempt to update a playlist lock which prevents the adding of new items would silently fail.
Title: Re: Library Tree Discussion
Post by: WilB on 2021-05-20 16:31:38
plman.IsAutoPlaylist also seems to resolve the original (https://hydrogenaud.io/index.php?topic=111060.msg981084#msg981084) reason for making the change. Thanks for the info.

I'll change it for the next version.

@Black_Over_Bills_Mothers
If you don't want to wait for the next version there are two instances of plman.IsPlaylistLocked that can simply be changed:
menu: line 154
populate: line 1276
Title: Re: Library Tree Discussion
Post by: wcs13 on 2021-05-31 18:59:53
Try:
Code: [Select]
comment HAS $nowplaying{$meta(artist,0)}
Thanks WilB. I see your point. That doesn't work in my case, but maybe there's no solution for what I'm trying to achieve.
I'm using Library Tree to retrieve songs that are similar to the currently playing song, and put them into a special playlist.
That works for songs that have the same title for example.
But sometimes my comment field has info that looks like this : "This song contains a sample from {Song title} by {Song artist}".
In that case, I'd like to retrieve {Song title} by {Song artist} in my library and add it to the special playlist. Can that be achieved ?

Currently my query is :
Code: [Select]
title IS $nowplaying{$if2($meta(original title,0),$meta(title,0))}
OR original title IS $nowplaying{$meta(title,0)}
OR comment HAS $nowplaying{$meta(artist,0)}
Title: Re: Library Tree Discussion
Post by: WilB on 2021-06-01 12:25:35
@wcs13
Quote
I'm using Library Tree to retrieve songs that are similar to the currently playing song, and put them into a special playlist. The following doesn't work in my case:
Code: [Select]
comment HAS $nowplaying{$meta(artist,0)}
Quote
...But sometimes my comment field has info that looks like this: "This song contains a sample from {Song title} by {Song artist}".
In that case, I'd like to retrieve {Song title} by {Song artist} in my library and add it to the special playlist. Can that be achieved ?

You can try:
Code: [Select]
comment HAS $nowplaying{$meta(artist,0)} AND comment HAS $nowplaying{$meta(title,0)}

or for your full code example
Code: [Select]
title IS $nowplaying{$if2($meta(original title,0),$meta(title,0))} OR original title IS $nowplaying{$meta(title,0)} OR comment HAS $nowplaying{$meta(artist,0)} AND comment HAS $nowplaying{$meta(title,0)}

Moved discussion (https://hydrogenaud.io/index.php?topic=110938.msg998519#msg998519) from uploads.
Title: Re: Library Tree Discussion
Post by: Smurth on 2021-06-03 08:40:25
This "Library Tree" is awesome and heavily configurable ;
Thank you for your impressive work.
Title: Re: Library Tree Discussion
Post by: regor on 2021-06-03 09:16:05
@wcs13
Quote
I'm using Library Tree to retrieve songs that are similar to the currently playing song, and put them into a special playlist. The following doesn't work in my case:
Code: [Select]
comment HAS $nowplaying{$meta(artist,0)}
Quote
...But sometimes my comment field has info that looks like this: "This song contains a sample from {Song title} by {Song artist}".
In that case, I'd like to retrieve {Song title} by {Song artist} in my library and add it to the special playlist. Can that be achieved ?

You can try:
Code: [Select]
comment HAS $nowplaying{$meta(artist,0)} AND comment HAS $nowplaying{$meta(title,0)}

or for your full code example
Code: [Select]
title IS $nowplaying{$if2($meta(original title,0),$meta(title,0))} OR original title IS $nowplaying{$meta(title,0)} OR comment HAS $nowplaying{$meta(artist,0)} AND comment HAS $nowplaying{$meta(title,0)}

Moved discussion (https://hydrogenaud.io/index.php?topic=110938.msg998519#msg998519) from uploads.
Not related to this script, but you can achieve exactly that with dynamic queries (https://github.com/regorxxx/Playlist-Tools-SMP)
COMMENT HAS #TITLE# AND COMMENT HAS #ARTIST# (will fully expand if there are multiple artists, or you can use $meta() if you want only one)

If you want to extract the info from the comment of the current track and get the artist and songs according to that to create a query:
TITLE IS #$substr(%comment%,$add(1,$strchr(%comment%,'{')),$sub($strchr(%comment%,'}'),1))# AND ARTIST IS #$substr(%comment%,$add(1,$strrchr(%comment%,'{')),$sub($strrchr(%comment%,'}'),1))#

X

X

Applied to my dummy track, works perfectly. (obviously I get 0 tracks since I have 0 songs named "song title", etc.)
X

You can even automatize the steps with a macro. Find the now playing track, apply the query to it, select the tracks retrieved by the query and send them directly to the autoplaylist you want with one click.
Title: Re: Library Tree Discussion
Post by: Smurth on 2021-06-03 18:24:57
My two cents:

View by genre with sub-genres:
Code: [Select]
$if(%genre%, $left(%genre%,$sub($strchr(%genre%,','),1)), --- Undefined ---)|[%genre%|]$nodisplay{%album artist%$if2(%RELEASE_DATE%,%date%)}[%album artist% ]$colour{--}$if(%RELEASE_DATE%,'('%RELEASE_DATE%')  :  ',$if(%date%,'('%date%')  :  ',  :  ))$colour{}$if2(%album%,%directoryname%)|$if(%tracknumber%,$colour{--}%tracknumber%.   $colour{}[%track artist% -- ]%title%,%filename%)

Title: Re: Library Tree Discussion
Post by: Smurth on 2021-06-04 23:14:35
My two cents:

View by genre with sub-genres:
Code: [Select]
$if(%genre%,$left(%genre%,$sub($strchr(%genre%,','),1))|%genre%,--- Undefined ---)|$nodisplay{$if(%album%,$if($stricmp(%album artist%,%PUBLISHER%),-C,%album artist%$if2(%RELEASE_DATE%,%date%),-S))}$if(%album%,$if(%album artist%,$if($stricmp(%album artist%,%PUBLISHER%),--- Compilations ---|,)%album artist% $colour{--}$if(%RELEASE_DATE%,'('%RELEASE_DATE%')  :  ',$if(%date%,'('%date%')  :  ',  :  ))$colour{}$if2(%album%,%directoryname%),$colour{--}%directoryname%)|$if(%tracknumber%,$colour{--}%tracknumber%.   $colour{}[%track artist% -- ]%title%,$if(%title%,[%track artist% -- ]%title%,%filename%)),--- Singles ---|$if(%artist%,[%artist% -- ]$nodisplay{%tracknumber%}%title%,%filename%))

Update:
- Items with no %album% are sort as "--- Singles ---"
- Items with %album artist% == %PUBLISHER% are sort as "--- Compilations ---"
Title: Re: Library Tree Discussion
Post by: WilB on 2021-06-16 21:59:39
@Smurth Thanks for the compliments :)

Nice pattern by the way.
Title: Re: Library Tree Discussion
Post by: Smurth on 2021-06-27 09:36:23
Hi, I guess I've found a bug / limitation...

When you select several items by using only the keyboard, like CTRL / SHIFT + Arrow keys, the destination playlist is not updated.
(it seems to be updated only on MLButtonUp)
Title: Re: Library Tree Discussion
Post by: WilB on 2021-06-27 12:07:42
Try setting the following:
options > behavior tab > keystroke > send to playlist
Title: Re: Library Tree Discussion
Post by: Smurth on 2021-06-27 13:04:42
Try setting the following:
options > behavior tab > keystroke > send to playlist

It works ; thank you.
There's still CTRL+A which select all (as intended) but not send it to the playlist ; but it's a minor issue.
Title: Re: Library Tree Discussion
Post by: WilB on 2021-06-27 13:48:25
I'll add it for the next version.
Title: Re: Library Tree Discussion
Post by: Smurth on 2021-07-05 16:55:48
Hi,

Maybe I am missing something and I know it could sound strange but it would be cool to have an option to NOT activate the destination playlist on selection change.

Another cool feature would be to allow filters based on user input ; something like %genre% HAS %typed_in_searchbox%.
Title: Re: Library Tree Discussion
Post by: WilB on 2021-07-05 18:41:16
1. Try: options > behaviour tab > Action: single click > set to 'Select'

2. Since search box already supports full query syntax, you can use, e.g.
Code: [Select]
%genre% HAS rock
rock can be changed to a new genre to alter the search parameter. Commonly used searches can be saved as a filters.
Title: Re: Library Tree Discussion
Post by: Smurth on 2021-07-05 20:03:59
1. Try: options > behaviour tab > Action: single click > set to 'Select'

Hum... No, that's not what I'd like.
I wish the selected items being send to the destination playlist without that playlist being activated.

2. Since search box already supports full query syntax, you can use, e.g.
Code: [Select]
%genre% HAS rock
rock can be changed to a new genre to alter the search parameter. Commonly used searches can be saved as a filters.

Again, that won't make it.
I'd like the possibility to append the user input to filter criteria.
Title: Re: Library Tree Discussion
Post by: regor on 2021-07-05 21:16:51
Hi,

Maybe I am missing something and I know it could sound strange but it would be cool to have an option to NOT activate the destination playlist on selection change.

Another cool feature would be to allow filters based on user input ; something like %genre% HAS %typed_in_searchbox%.

That's a dynamic query which you can find implemented here Playlist-Tools-SMP (https://github.com/regorxxx/Playlist-Tools-SMP).
Spoiler (click to show/hide)
If you are interested on getting all tracks according to a query evaluated with the selection that should do (output on a playlist), if you want to use it to filter the library view then the script would need its own implementation (or copy mine for filtering).

Title: Re: Library Tree Discussion
Post by: Smurth on 2021-07-05 22:11:06
if you want to use it to filter the library view then the script would need its own implementation (or copy mine for filtering).
That's what I want.
I guess I'll have to dig into WilB scripts to append the user input to the query filter...
Title: Re: Library Tree Discussion
Post by: regor on 2021-07-05 22:21:14
if you want to use it to filter the library view then the script would need its own implementation (or copy mine for filtering).
That's what I want.
I guess I'll have to dig into WilB scripts to append the user input to the query filter...

All you need is at helpers/helpers_xxx_tags.js.
Look for 'queryReplaceWithCurrent'.
I would recommend you to check the query validity after creating it and before using it for filtering (avoids crashes), an example is given at main/dynamic_query.js
Look for 'checkQuery' (at same helpers file)

I think those 2 functions are all you need (and they have no further dependencies), you can just copy/paste to your own helper or file.
Title: Re: Library Tree Discussion
Post by: WilB on 2021-07-05 22:48:08
1. It wasn't clear exactly what you meant. Simplest solution is drag & drop onto the required playlist in a playlist manager (may work best if set single click to 'Select'). I tested with default playlist manager & simplaylist manager. If that's not good enough, then currently library tree only sends to active playlist. If that was changed so it could send to any playlist, then there needs to be a way of choosing that playlist. If you can suggest a way that isn't cumbersome to implement I'd consider it, but my initial feeling is that it may not be very user friendly??

2. Again it wasn't clear exactly what you meant, so I started with the simple method...

In fact I suppose what you want is something like a:
 filter: genre HAS $searchtext

$searchtext would identify the filter as a special filter, and filters created in usual way, e.g.
genre HAS $searchtext
artist HAS $searchtext
title HAS $searchtext

So for, genre HAS $searchtext, then when type, e.g.  rock, in search bar it runs query: genre HAS rock

I've already implemented it for the next version & it works very well. Great idea!
Title: Re: Library Tree Discussion
Post by: Smurth on 2021-07-06 06:15:33
1. It wasn't clear exactly what you meant. Simplest solution is drag & drop onto the required playlist in a playlist manager (may work best if set single click to 'Select'). I tested with default playlist manager & simplaylist manager. If that's not good enough, then currently library tree only sends to active playlist. If that was changed so it could send to any playlist, then there needs to be a way of choosing that playlist. If you can suggest a way that isn't cumbersome to implement I'd consider it, but my initial feeling is that it may not be very user friendly??

Currently, I use this in the first panel (see photo)
It does exactly what I want. The results are send to the "Library Tree Panel Selection" playlist and the second panel can "read" this as its input and send its own results to another playlist.
What I'd like - it's not a big deal, in fact - is the first panel NOT activating the "Library Tree Panel Selection" playlist on selection change and doing its job "silently", "in the background", so to speak.


2. Again it wasn't clear exactly what you meant, so I started with the simple method...

In fact I suppose what you want is something like a:
 filter: genre HAS $searchtext

$searchtext would identify the filter as a special filter, and filters created in usual way, e.g.
genre HAS $searchtext
artist HAS $searchtext
title HAS $searchtext

So for, genre HAS $searchtext, then when type, e.g.  rock, in search bar it runs query: genre HAS rock

I've already implemented it for the next version & it works very well. Great idea!

Yes, it's exactly that !
Thank you very much.
(The idea comes from EsPlaylist)


On a side note, the searchbox could react to double-clic by selecting its content, like it does in a regular edit box.
Title: Re: Library Tree Discussion
Post by: Tropoje on 2021-07-06 06:53:40
I installed a new version of Library Tree but unfortunately something is not working. I did everything as in the update guide
https://hydrogenaud.io/index.php?topic=110938.msg997853#msg997853

(https://i.postimg.cc/Y9CGjjWw/2021-07-06-07-51-004.jpg)
(https://i.postimg.cc/7ZPyF78D/2021-07-06-07-41-001.jpg)
(https://i.postimg.cc/Cxr99QsH/2021-07-06-07-41-002.jpg)
(https://i.postimg.cc/PxYcprs2/2021-07-06-07-42-003.jpg)

I don't know what I'm doing wrong  :(

Title: Re: Library Tree Discussion
Post by: Smurth on 2021-07-06 07:35:43
I installed a new version of Library Tree but unfortunately something is not working. I did everything as in the update guide
https://hydrogenaud.io/index.php?topic=110938.msg997853#msg997853

Have you named the package folder {E85C9EF0-778B-46DD-AF20-F4BE831360DD} ?
Title: Re: Library Tree Discussion
Post by: Tropoje on 2021-07-06 08:03:45
I have as it is in the guide

(https://i.postimg.cc/rswfG7ht/2021-07-06-09-01-006.jpg)
Title: Re: Library Tree Discussion
Post by: Smurth on 2021-07-06 08:21:53
I have as it is in the guide

I have no idea, then.
Title: Re: Library Tree Discussion
Post by: WilB on 2021-07-06 10:34:33
@Tropoje

1. The error is caused by DefinePanel. However, DefinePanel is not used at all ‌in library tree v2.2.0-Beta.1; so that's coming from somewhere else.

2. Panel properties are still showing the old properties in v2.1.3 style.

3. So for reasons unknown it looks as though it still has the old version of library tree in there.

I suggest reinstalling as follows, to exclude a bunch of possible reasons.

A. Before proceeding, ENSURE YOU HAVE A BACK-UP COPY OF PANEL PROPERTIES for all library tree instances, if you haven't already, & wish to retain settings. Ideally this should be from the v2.1.3 install, but if you haven't that, try exporting them from what you have as it appears they haven't been updated.

B. Remove  library tree from all panels, e.g. Use windows key + shift + right click > configure panel. On script tab set panel to In-memory.

B. Ensure v1.5.0  of spider monkey panel or v1.5.1 (has a shutdown bug at least on standard installs) is being used as these have fixed a bunch of teething problems with the package manager.

C. Manually delete the current package for library tree (i.e. {E85C9EF0-778B-46DD-AF20-F4BE831360DD} folder) in windows explorer. You might need to shut foobar2000.

D. CLOSE all windows explorer instances.

E. Open foobar2000. Use windows key + shift + right click on the panel > configure panel. On the script tab choose package & import the library tree package. If all goes OK you can then import the old panel properties using the properties tab.

@Smurth
I can add a check box that sets whether the default playlist is activated.
Title: Re: Library Tree Discussion
Post by: Tropoje on 2021-07-06 11:04:13
@WilB

Thank you so much for your help my friend. Now everything works as it should  ;D  I love Library Tree, I can't imagine foo without your script.

Thank you for your work and I wish you much health during this time.
Title: Re: Library Tree Discussion
Post by: Smurth on 2021-07-06 12:22:37
@Smurth
I can add a check box that sets whether the default playlist is activated.

Thank you ;)
Title: Re: Library Tree Discussion
Post by: Tropoje on 2021-07-06 15:55:20
@WilB
Could you add the ability to reorder the Filters and Views in panel? Until now I had to move everything manually, now there is a panel so maybe it would be possible to implement such a possibility. Something like a drag and drop option.

(https://i.postimg.cc/VNtBgR94/11.jpg)
(https://i.postimg.cc/2Ssn1WpW/22.jpg)
Title: Re: Library Tree Discussion
Post by: WilB on 2021-07-06 16:27:17
There are up & down buttons at the bottom which are active when click on a view or filter.
Title: Re: Library Tree Discussion
Post by: Tropoje on 2021-07-06 18:26:25
There are up & down buttons at the bottom which are active when click on a view or filter.
Oh my gosh, I overlooked that. Great, such an option was missing me in the previous version Library Tree
Thank you
Title: Re: Library Tree Discussion
Post by: WilB on 2021-07-25 18:02:52
New Version: Library Tree v2.2.0 (https://hydrogenaud.io/index.php?topic=110938.msg1001096#new)

Changelog

Changed
- playlist handling now supports new spider monkey panel GetPlaylistLockedActions
- improved search text handling:
    - added search history (click search icon). Search item is added to history after a short delay (3 seconds) to minimise incomplete entries and typos
    - added support for font kerning
    - added support for double click (select all)
- library-tree-cache of album art: now uses new spider monkey panel package_data location

Added
- album art: new options
    - compact style with blend & dark labels
    - root collage of displayed images (allmusic)

- playlist: activate when changed option

- More flexible filters that operate in conjunction with search where $searchtext can be used to return search text, e.g.

1)
Name: genre HAS
Filter: genre HAS $searchtext
Search text: rock
Yields: genre HAS rock

2)
Name: rating GREATER
Filter: %rating% GREATER $searchtext
Search text: 4
Yields: %rating% GREATER 4

Fixed
- rare image error
- Ctrl+A (select all) now sends to playlist if that keystroke action is enabled (options > beahviour tab)
- follow selection issue in album art mode if panel initially hidden
- tree lines sometimes not drawing
- some issues when active playlist is the source

Removed
- panel properties & configure from internal menu
    - use right click of library tree while pressing the windows key + shift instead
    - works better as also gives access to all package features
Title: Re: Library Tree Discussion
Post by: MojoBass on 2021-08-01 05:19:02
@WilB: this is great work!!
Sorting with $nodisplay seems to have an issue with items starting with numbers.
So on my side when using
Code: [Select]
$nodisplay{$sub(99999,%date%)}%album%
albums with leading number in the album name (e.g. '18 Singles' by U2) are not in the order given by date, but at the end of the list.
Title: Re: Library Tree Discussion
Post by: WilB on 2021-08-01 12:59:16
Thanks for the feedback.

If you're inclined, in library.js you can try replacing line 883 with:

Code: [Select]
if (panel.noDisplay) name = name.replace(/#@#/g, '');

The fix should be in the next version.
Title: Re: Library Tree Discussion
Post by: MojoBass on 2021-08-01 19:50:57
@WilB: Thank you very much for the quick fix!
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2021-08-17 10:07:09
Thank you very much for the great programmer work.I currently only use the album cover view. Is it possible to change the labels under the covers?  and if so where?  Thanks in advance
Title: Re: Library Tree Discussion
Post by: WilB on 2021-08-17 11:38:36
You didn't say how you wanted to change the album art cover labels. So here are the various ways.

Label position & style
Options\album art tab
Choose from bottom, right etc.

Text colour
Uses user interface settings by default. Individual lines can be coloured differently by applying the $colour syntax to the view pattern (for full $colour syntax see extended syntax help on options\views tab), e.g. add the following view on the options\views tab

Code: [Select]
$colour{0-255-0}%album artist%|$colour{255-128-64}%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
gives album artist line in orange & album line in green, as an example

Display names
These are determined by the view pattern (settings drop down menu > views). New views can be added on the options\views tab.

The number of lines displayed is automatically determined by default. That can be overridden on settings drop down menu > album art > change "group auto" to that required.

Font style
Options\custom tab

Font name & size
Uses that of main text which is the user interface setting by default.
Can be changed in options\custom tab. Font size can also be changed by pressing ctrl + alt and rotating the mouse wheel.
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2021-08-17 12:05:37
Perfect...thank you very very much
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2021-08-17 12:57:33

I have another question ... is there a way to create a filter that contains the titles of the currently running path?
Title: Re: Library Tree Discussion
Post by: handleyman on 2021-08-17 16:29:02
Just curious: all works well, except for the third instance (of three), which returns this error every time you right-click an item..

Error: Spider Monkey Panel v1.5.2 ({46FD88FD-9938-42FF-803E-5C28B87C167C}: Library Tree v2.2.0 by WilB)
GetPlaylistLockedActions failed:
Index is out of bounds

File: menu.js
Line: 156, Column: 25
Stack trace:
  flags@menu.js:156:25
  get@menu.js:57:38
  getItems/<@menu.js:62:37
  getItems@menu.js:62:9
  addItem@menu.js:26:9
  load/<@menu.js:67:52
  load@menu.js:67:18
  rbtn_up@menu.js:474:8
  on_mouse_rbtn_up@callbacks.js:198:13
Title: Re: Library Tree Discussion
Post by: WilB on 2021-08-17 18:30:05
@DJ FRANK G. 
Quote
... filter by currently running path
This is a general title format / query issue. I don't think either can get the current running path.

You could use a different filter for each path (if there are only a few). Choose a unique part of the path to check, e.g.

Code: [Select]
%path% HAS c:\
Change as required


@handleyman

Thanks for the feedback.

It seems plman.GetPlaylistLockedActions(playlistIndex) doesn't handle the playlistIndex being out of bounds.

I'll add a fix to the next version.
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2021-08-17 20:06:00
@DJ FRANK G. 
Quote
... filter by currently running path


I solved it by creating a filter for the now playing album:
album IS $nowplaying{$meta(album,0)} AND album date IS $nowplaying{$meta(album date,0)} AND album artist IS $nowplaying{$meta(album artist,0)} AND medium IS $nowplaying{$meta(medium,0)}

Now I can show all tracks from the nowplaying album as you can see in my video:


https://youtu.be/qFMJGbW6Hgw (https://youtu.be/qFMJGbW6Hgw)


Title: Re: Library Tree Discussion
Post by: mjm716 on 2021-08-18 05:51:10
youtube

Are the columns in your  "song view" via Facets or is that some implementation of Library Tree?
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2021-08-18 09:04:26
Facets
Title: Re: Library Tree Discussion
Post by: Lucidae on 2021-08-18 10:31:34
Is there another way to activate/deactivate album cover view apart from the menu option under quick setup (which resets user-defined settings)?
Title: Re: Library Tree Discussion
Post by: WilB on 2021-08-18 12:48:39
The context menu has an option of either:
Show tree
or
Show album art

If you click show album art, it should take you to the cover of the selected item, and vice versa.
Title: Re: Library Tree Discussion
Post by: Lucidae on 2021-08-18 13:15:25
The context menu has an option of either:
Show tree
or
Show album art

If you click show album art, it should take you to the cover of the selected item, and vice versa.
Ah now I see the option - thanks. The right click context menu was the last place I thought to look.
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2021-08-18 19:18:12
super cool this programming work. Finally, in my nowplaying view, I can display the entire content of the album as information and the title currently being played is displayed as a highlight. however, if there are more than 34 tracks on the album, I have to scroll manually down to view the track currently being played. is there a way to automatically scroll to the track being played?
Thanx

https://photos.app.goo.gl/uQPLg58r4DtzMEJy7 (https://photos.app.goo.gl/uQPLg58r4DtzMEJy7)

On the first photo you can see how it would be perfect. The seconde photo show the list after the track change...
Title: Re: Library Tree Discussion
Post by: WilB on 2021-08-18 19:25:24
Context menu has show nowplaying.
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2021-08-18 21:38:02
Library Tree highlight the nowplaying track...but die Not scroll automatic to show it.
Title: Re: Library Tree Discussion
Post by: marc2k3 on 2021-08-19 01:29:43
You need a playlist viewer for that, not a library viewer.
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2021-08-19 05:44:07
But only library tree can filter the nowplaying data
Title: Re: Library Tree Discussion
Post by: Lucidae on 2021-08-19 07:45:33
is there a way to automatically scroll to the track being played?
Are you referring to playlist view? Because you can toggle that behavior from the main menu under playback -> "cursor follows playback".
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2021-08-19 10:36:44
no that's not the problem.  The current track is displayed here in the library tree.  as long as the album has a normal number of tracks, that's no problem.  If the album has more than 34 tracks and the current title has the track number 36, for example, it will only be displayed after you have manually scrolled down.
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2021-08-19 10:38:48
Playlist never can filter by nowplaying...so i show the tracks with library tree
Title: Re: Library Tree Discussion
Post by: MachineHead on 2021-08-19 13:11:35
I can get a reproducible crash if I r-click on any item and there is nothing in a (or any) playlist. Happened to be a new test install and tried right clicking on an item in the Library Tree as the library was indexing. Error pop-up below. Wasn't sure if this is a known issue or not.

(https://i.imgur.com/7eEPZgb.png)
Title: Re: Library Tree Discussion
Post by: WilB on 2021-08-20 12:00:03
Yes it was reported a few posts above. I have fixed it in my version, but it needs more testing as there are a number of playlist lock-types that need carefully checking.

I think the simple workaround until the fix is released is to send an item to the playlist by clicking an item in the tree, so the playlist is created. Hopefully context menu won't then give an error.
Title: Re: Library Tree Discussion
Post by: Koshingg on 2021-08-20 18:03:12
I have this error for some time, maybe it can be solved (sometimes it happens when foobar starts, sometimes while playing a song) :

Error: Spider Monkey Panel v1.5.2 ({A2F9FB52-52E4-4C27-BBD5-98D49595455A}: Library Tree v2.2.0 by WilB)
arr1 is undefined

File: helpers.js
Line: 69, Column: 11
Stack trace:
  equal@helpers.js:69:11
  updateLibrary/<@library.js:936:16
  updateLibrary@library.js:926:28
  treeState@library.js:907:15
  on_library_items_changed@callbacks.js:139:6
Title: Re: Library Tree Discussion
Post by: WilB on 2021-08-20 20:09:25
Thanks for the report.

I'll add a fix to the next version.
Title: Re: Library Tree Discussion
Post by: Lucidae on 2021-08-21 12:46:40
I noticed the A-Z jumpbar that appears when scrolling through album covers, a very handy feature to have, though it assumes your library is sorted alphabetically.
Would it be possible to implement a year jumpbar for chronologically sorted views also?
Title: Re: Library Tree Discussion
Post by: WilB on 2021-08-22 17:33:18
I assume you talking about the character that appears on dragging the scrollbar. Currently it just shows the 1st character whether it's a number or letter. Do you mean you want to be able to show all 4 digits of the year instead, e.g. 2020. But then other views would also show more characters, which seemed OK in a quick test. It also needs a much wider margin, if on left. Please confirm & clarify exactly what you mean.
Title: Re: Library Tree Discussion
Post by: Lucidae on 2021-08-22 19:34:46
I assume you talking about the character that appears on dragging the scrollbar. Currently it just shows the 1st character whether it's a number or letter. Do you mean you want to be able to show all 4 digits of the year instead, e.g. 2020. But then other views would also show more characters, which seemed OK in a quick test. It also needs a much wider margin, if on left. Please confirm & clarify exactly what you mean.
Yeah, that's what I was thinking.
For example if your tree is sorted by %year% - %album%, then the first letter shown on the side wouldn't be too helpful.
So perhaps an option to replace A-Z with the date(yyyy) as you said? What if it was shown in a tooltip so it doesn't take up space in the margin?
Title: Re: Library Tree Discussion
Post by: n0stalgia on 2021-09-28 09:44:03
Is there a way in title formatting to hide a field? I'd like to sort albums by date, but not display it.

Code: [Select]
%album artist%|[%date%] %album%

Ideally, the output would be
Artist
    Album 1
    Album 2

While albums are sorted by date, not alphabetically.
Title: Re: Library Tree Discussion
Post by: Lucidae on 2021-09-28 12:16:52
Is there a way in title formatting to hide a field? I'd like to sort albums by date, but not display it.
Sure, you can use the $nodisplay{X} syntax to do that.
Code: [Select]
%album artist%|$nodisplay{$year(%date%)}%album%
Title: Re: Library Tree Discussion
Post by: n0stalgia on 2021-09-28 20:51:06
Sure, you can use the $nodisplay{X} syntax to do that.
Yes, thank you very much, this is exactly what I was looking for. Where did you find this command? I searched through the title formatting reference, but it's not there, and the syntax leads me to believe this is something exclusive to Spider Monkey Panel?
Title: Re: Library Tree Discussion
Post by: Lucidae on 2021-09-29 04:13:53
Yes, thank you very much, this is exactly what I was looking for. Where did you find this command? I searched through the title formatting reference, but it's not there, and the syntax leads me to believe this is something exclusive to Spider Monkey Panel?
Look in the settings window for Library Tree on the Views tab, click the button that says "Show Extended Syntax Help".
From what I understand if the command has curly brackets it will only work with this script.
Title: Re: Library Tree Discussion
Post by: n0stalgia on 2021-09-29 09:48:06
Thanks.

Another question: I ported my current config to another Windows device and suddenly I'm missing the font for the "Triangles" option. What is the font that's required to render those? They appear as white rectangular frames on that system atm.
Title: Re: Library Tree Discussion
Post by: Lucidae on 2021-09-29 11:29:05
Another question: I ported my current config to another Windows device and suddenly I'm missing the font for the "Triangles" option. What is the font that's required to render those? They appear as white rectangular frames on that system atm.
I assume its "Segoe UI Symbol", at least that's the default in the advanced tab under scrollbar options.
Title: Re: Library Tree Discussion
Post by: WilB on 2021-09-29 11:54:32
@n0stalgia You probably need to install FontAwesome (https://github.com/FortAwesome/Font-Awesome/blob/fa-4/fonts/fontawesome-webfont.ttf?raw=true) (it's one of the requirements).

@Lucidae I've added the requested feature to album art mode, i.e. scrollbar drag characters show 4 digits if leading %date%. It should be in the next version.
Title: Re: Library Tree Discussion
Post by: Lucidae on 2021-09-29 12:31:58
I've added the requested feature to album art mode, i.e. scrollbar drag characters show 4 digits if leading %date%. It should be in the next version.
That's wonderful, thanks!

Earlier I was trying to figure out how to configure two-panel mode as seen in your screenshot here;
https://i.imgur.com/4uIiuks.png
Title: Re: Library Tree Discussion
Post by: n0stalgia on 2021-09-29 13:24:33
You probably need to install FontAwesome (https://github.com/FortAwesome/Font-Awesome/blob/fa-4/fonts/fontawesome-webfont.ttf?raw=true) (it's one of the requirements).
Thank you, this did the trick!

Title: Re: Library Tree Discussion
Post by: n0stalgia on 2021-09-29 13:28:10
I've also ran into a weird sorting issue. When an album's name is just numeric characters [0-9]+, my sorting algorithm breaks. Case in point:

(https://i.imgur.com/JwWnfOZ.jpg)   (https://i.imgur.com/Sk3fyvB.jpg)

All I did between the two screenshots is rename the album "604". Here's the View configuration I'm using:
Code: [Select]
%album artist%|$nodisplay{$year(%date%)}%album% '('%date%')'|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%

How would I work around that?
Title: Re: Library Tree Discussion
Post by: WilB on 2021-09-29 13:38:48
@n0stalgia It sounds like this bug (https://hydrogenaud.io/index.php?topic=111060.msg1001331#msg1001331). I've fixed it for the next version.  The fix is trivial (https://hydrogenaud.io/index.php?topic=111060.msg1001331#msg1001331) and you can easily do it if you don't want to wait. Hopefully that's it.

@Lucidae
1. You need two library tree panels.
2. For 2nd panel: set ... > source > panel.
3. That should also give a pop-up with more info.
4. But the only other thing would be to stop 1st panel sending to playlist as 2nd would do that. So in options > behavior set action > single click: to select for 1st panel. 1st panel continues to use the library as source.
5. Then when click an item in 1st panel it's sent to 2nd.

HTH
Title: Re: Library Tree Discussion
Post by: novaca on 2021-10-04 11:33:55
To a two-panel mode:

Is it possible to use the display of downloaded photos from Biography for a tag other than Artist?
I know how to change who is shown, but only the Artist is looking.

The functioning of my dreams would be:
- I will mark the album in the Foobar2000 filter
- in the 1st Library tree panel I will see photos of artists (it would be possible to set Performer, Composer, Conductor, etc ...or more of them at once)
- after clicking on one of them, the albums in which they participated would appear in the 2nd Library tree panel

Is something like this possible? :)
Title: Re: Library Tree Discussion
Post by: handleyman on 2021-10-05 16:21:33
Here's a thing: when I use two Lib tree panels, as suggested above, they work exactly as described: panel 1 > Panel 2, and Panel 2> Playlist. However, in the separate FB Playlist 'list', Panel 2 correctly populates a playlist of its own, I've called it 'Tree' in the Options' But Panel 1 also popuates a playlist of its own, called 'Library Tree Panel Selection'. Where does that come from, and how can I change its name? Nothing I enter in the Options panel for that one changes the name...
Title: Re: Library Tree Discussion
Post by: WilB on 2021-10-07 19:37:23
@novaca

It is possible display the downloaded photos from Biography for a tag other than artist, assuming the images exist.

Change the tag name in the album art artist patterns, e.g. to performer:
Code: [Select]
*YOUR PATH*\yttm\art_img\$cut(%performer%,1)\%performer%\*
Then try a pattern like:
Code: [Select]
%performer%|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
It should find the image if it exists.

As foobar2000 album art view patterns return first found, likely the artist pattern would have to be removed (or commented out) else you'll get the wrong image, so I'm not sure how practical it is.

Regarding the other thing, the ¦ splitter can be used to combine fields into the same level , e.g. something like:
Code: [Select]
%artist%¦%performer%¦%composer%¦%conductor%|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
This should work fine in tree view. maybe that's good enough. However, the foobar2000 album art loader requires a handle to do the look-up. Even though library tree can split items with the same handle, e.g. to give separate performer and artist entries, the handle (music file) for the two would be the same & so they would return the same image, and so only one would be correct.

It is possible to change that so it does a direct look-up of the artist image, bypassing foobar2000 album art loader altogether. So the artist image loads based on the display name rather than the handle, & so it would correctly deal with this complex scenario.

But then there's the issue of settings. Currently it uses the foobar2000 way so all patterns for album art are in one place which is much simpler. This would require path entry for artist patterns entry I guess on the album art tab as well. But then the foobar2000 way allows multiple entries and so to support multiple paths it gets quickly gets complex.

I did a quick implementation to see how it worked. It seemed rather odd that when you click on a picture of artist x, you also get covers of albums by other artists which really isn't very intuitive.

So overall I'm unconvinced its worth the effort - since you may even find it doesn't work as well as you think it will. You can try with tree view.

@handleyman

The 'Library Tree Panel Selection' playlist is used to save the contents of the 2nd panel so its available between foobar2000 restarts. AFAIK its the only way of saving handle lists, unless I missed some recent changes to SMP. Seeing as it is essentially a 'system' playlist it's not designed for user interaction and so it's name is hardcoded. So only way of changing currently is to do a Find & Replace on callbacks.js + library.js (there are 3 instances in total). I could make it definable in panel properties if you think that's useful.
Title: Re: Library Tree Discussion
Post by: novaca on 2021-10-11 11:16:06
add 1) I can already see it, I had the path to the image set correctly, but I incorrectly assigned the filter pattern, my school error :)

add 2) I was carried away by new possibilities and my imagination. But now I see that what I imagined is not a useful task for what the "library tree" does. It would be more of a function for something like "album participating persons preview / information" and there is no point in complicating what now works smoothly. It was more about exploring the library than browsing the library...
By the way, part of it is already possible thanks to your "biography" (although not so clearly and only the passive part).

Thanks for your work.
Title: Re: Library Tree Discussion
Post by: hdfan2 on 2021-12-10 03:53:32
Just installed latest version (2.2.0). Foobar 1.6.8. On right-click in playlist it becomes red and gives a crash report:

Error: Spider Monkey Panel v1.5.2 ({B9F1181F-0CD1-40B4-BFA5-AEABEFF362BF}: Library Tree v2.2.0 by WilB)
GetPlaylistLockedActions failed:
Index is out of bounds

File: menu.js
Line: 156, Column: 25
Stack trace:
  flags@menu.js:156:25
  get@menu.js:57:38
  getItems/<@menu.js:62:37
  getItems@menu.js:62:9
  addItem@menu.js:26:9
  load/<@menu.js:67:52
  load@menu.js:67:18
  rbtn_up@menu.js:474:8
  on_mouse_rbtn_up@callbacks.js:198:13
Title: Re: Library Tree Discussion
Post by: st1krOne on 2021-12-14 10:21:03
New Version: Library Tree v2.2.0

REQUIREMENTS:
Spider Monkey Panel 1.5.0+ (https://www.foobar2000.org/components)
IE8 or later
FontAwesome (https://github.com/FortAwesome/Font-Awesome/blob/fa-4/fonts/fontawesome-webfont.ttf?raw=true)

Please post discussion here (https://hydrogenaud.io/index.php?topic=111060.0)

INSTALLATION

This version has to be installed as a package.

If UPDATING consider exporting panel properties to back-up settings (right click the panel while pressing the windows key + shift)
    - REQUIRED if updating from v2.1.3 or earlier & you wish to retain panel settings. Import them after installation.
    - OPTIONAL if updating a package, as settings should automatically be retained. Recommended as good practice, if you've done significant customization, in case the unexpected happens.

New install or update:
1) Add a spider monkey panel to foobar2000 if required
2) Close any instances of windows explorer using foobar2000 folders or subfolders
3) Right click the spider monkey panel while pressing the windows key + shift
4) Choose configure panel
5) On the script tab ensure package is selected
6) Open package manager if it doesn't open automatically
7) Import the package

I beg your pardon, but apparently I'm very stupid. I was unable to install the script according to the instructions.

Can I attach pictures? Thank you.
Title: Re: Library Tree Discussion
Post by: hamybal on 2021-12-16 18:27:41
Highly appreciated WilB this is an incredible tool which I really enjoyed using the last few days!

I've tried a lot of settings but I cannot seem to find something that is possible with the normal component like album list or playlist view, and that is if you click + hold your mouse scroll to scroll really quickly up & down. I'm not sure if it's included but if it's could you show me how to use it.

Have a wonderful day!
Title: Re: Library Tree Discussion
Post by: Tropoje on 2021-12-26 18:24:10
In the new Library Tree, I cannot find the option to click the middle mouse button to Add a selected item from the tree to the current list. Did I miss something?

Are these all the settings available?
(https://i.postimg.cc/R0wXwD2S/2021-12-26-19-21-014.png)
Title: Re: Library Tree Discussion
Post by: hamybal on 2022-01-02 20:49:44
Hey WilB, When I right click the component it will crash.

Error: Spider Monkey Panel v1.5.2 ({E1222E8B-5CC5-4D87-A137-D60EBDE0D5CA}: Library Tree v2.2.0 by WilB)
GetPlaylistLockedActions failed:
Index is out of bounds

File: menu.js
Line: 156, Column: 25
Stack trace:
  flags@menu.js:156:25
  get@menu.js:57:38
  getItems/<@menu.js:62:37
  getItems@menu.js:62:9
  addItem@menu.js:26:9
  load/<@menu.js:67:52
  load@menu.js:67:18
  rbtn_up@menu.js:474:8
  on_mouse_rbtn_up@callbacks.js:198:13

Do I have to edit something to make it stop from happening?
Title: Re: Library Tree Discussion
Post by: WilB on 2022-05-04 17:55:29
New Version: Library Tree v2.3.0 (https://github.com/Wil-B/Library-Tree/releases)

This is a maintenance update with a few new features.
Title: Re: Library Tree Discussion
Post by: paregistrase on 2022-05-04 18:17:22
New Version: Library Tree v2.3.0 (https://github.com/Wil-B/Library-Tree/releases)

This is a maintenance update with a few new features.

Great improvements for WINE users.

Code: [Select]
Wine stabilisation: library tree should no longer give errors in Wine, but some limitations remain:

    copy & paste into search box may not work. It can be fixed by installing this version of Spider Monkey Panel (v1.6.2-dev+7c0928bf) which includes marc2k3's utils.GetClipboardText/utils.SetClipboardText (thx to marc2k3)
    recycler is unlikely to work: it's used when refreshing images: windows explorer can be used to remove images from the cache instead
    options dialog may not load: menu now indicates there was a problem & console explains what can be done instead


Thank you very much Sir

Title: Re: Library Tree Discussion
Post by: TT on 2022-05-05 11:41:51
Thanks for the new version @WilB,

great work =)

It's also nice to see you active on Github!

-TT
Title: Re: Library Tree Discussion
Post by: yeyo on 2022-05-07 04:41:36
New Version: Library Tree v2.3.0 (https://github.com/Wil-B/Library-Tree/releases)

This is a maintenance update with a few new features.
Hi,WilB,Thank you for updating your work!I encountered the following crash problem:

Error: Spider Monkey Panel v1.6.1 (JS Smooth Browser: Library Tree v2.3.0 by WilB)
m is null

File: images.js
Line: 901, Column: 27
Stack trace:
  metrics@images.js:901:27
  on_size@panel.js:700:27
  on_size@callbacks.js:330:8
  @main.js:36:2

Title: Re: Library Tree Discussion
Post by: Air KEN on 2022-05-07 10:06:26
@ yeyo
Same problem.

Crash:
Views > View by folder structure
Qiuck setup > "Album covers" or "Flow mode"

Windows 11, foobar2000 v1.6.11
Spider Monkey Panel 1.6.1 and 1.6.2-dev+7c0928bf
Title: Re: Library Tree Discussion
Post by: WilB on 2022-05-12 16:39:22
New Version: Library Tree v2.3.1 (https://github.com/Wil-B/Library-Tree/releases)

Fix for the error reported by @yeyo and @Air KEN.
Title: Re: Library Tree Discussion
Post by: Air KEN on 2022-05-12 23:32:51
@ WilB
This issue has been resolved. Many thanks.
Title: Re: Library Tree Discussion
Post by: yeyo on 2022-05-13 04:24:59
New Version: Library Tree v2.3.1 (https://github.com/Wil-B/Library-Tree/releases)

Fix for the error reported by @yeyo and @Air KEN.
THX!@WilB
Title: Re: Library Tree Discussion
Post by: yeyo on 2022-06-15 10:37:20
New Version: Library Tree v2.3.1 (https://github.com/Wil-B/Library-Tree/releases)

Fix for the error reported by @yeyo and @Air KEN.

Suggestion: add the option of custom size of cover, width x height (PX)
Title: Re: Library Tree Discussion
Post by: Koshingg on 2022-06-16 22:49:38
Sometimes the options panel won't open, the same thing that some people have reported https://hydrogenaud.io/index.php/topic,112914.msg1011854.html#msg1011854 (by mistake), on the Biography script page. Until now, it happened twice, after reboot the problem disappears
Title: Re: Library Tree Discussion
Post by: WilB on 2022-06-18 13:13:25
@yeyo
Cover size. You can choose from various thumbnail sizes (small, regular, medium, large) on the album art tab. You can also use ctrl + alt + shift & rotate the mouse wheel for other sizes (see show album art help on the album art tab for more info).

Options dialogue sometimes not opening.

In the last version extra checks were added to test if ShowHtmlDialog is supported, which display of options requires. ShowHtmlDialog should be supported for all users except those running Wine or those who don't want to install internet explorer. The extra checks use regor's getSoFeatures checker. Possibly it sometimes isn't giving the correct answer.

Attached is a debug version. Users experiencing the issue could replace so.js in ...foo_spider_monkey_panel\packages\{E85C9EF0-778B-46DD-AF20-F4BE831360DD}\scripts with the debug version and post the console log when the issue happens to see if it shows anything. Note that so.js in bio & library tree aren't the same.
Title: Re: Library Tree Discussion
Post by: 2263431335 on 2022-06-19 12:03:20
@WilB

Can you highlight a round border instead of a square one?

now it is square one
(https://i.postimg.cc/MGPqWgNJ/QQ-20220619190420.png)

i think a round border will be perfect
(https://i.postimg.cc/gJmkJvk3/QQ-20220619185800.png)
Title: Re: Library Tree Discussion
Post by: WilB on 2022-06-20 18:03:48
@2263431335

To clarify, you mean show a round border only when the library tree setting on the album art tab for labels is set to none and on the display tab the hover effect (background) is set to use the frame - as in your images. I think it looks fine then. Please confirm that's what you mean.

If text names for artist or album etc are displayed along with the thumbnail it didn't seem to work as well as the current options.
Title: Re: Library Tree Discussion
Post by: 2263431335 on 2022-06-22 11:05:27
yes , you are right
Title: Re: Library Tree Discussion
Post by: The Chief on 2022-06-23 00:10:20
Where can I find FILTER syntax description? All these :

[' AFTER ', 'ALL', ' AND ', ' BEFORE ', ' DURING ', ' EQUAL ', ' GREATER ', ' HAS ', ' IS ', ' LESS ', ' MISSING', ' NOT ', ' OR ', ' PRESENT', ' SINCE '];
Title: Re: Library Tree Discussion
Post by: WilB on 2022-06-23 00:16:58
Check the query syntax help.

You can click on the search icon in library tree (top left) & it's the first item on the drop down menu.
Title: Re: Library Tree Discussion
Post by: The Chief on 2022-06-23 00:47:07
You can click on the search icon in library tree (top left) & it's the first item on the drop down menu.
Thanx. So, no complex logic, no branches as  (expr 1 OR expr2) AND expr3  , right?

Oh, and a little question: how can I hide some tracks at all? Based on some tag, maybe? What I want to do is to hide some garbage tracks loaded from DVDA/SACD iso images.
Title: Re: Library Tree Discussion
Post by: The Chief on 2022-06-23 08:50:52
Aha, I've figured it! Yes, it supports round brackets, so I can use complex logic.
For ex:
Name: Hi-res
Query: ("%samplerate%" GREATER 44100 OR "$info(bitspersample)" GREATER 16) AND NOT Album IS ꓸ
Title: Re: Library Tree Discussion
Post by: yeyo on 2022-06-28 01:36:04
@yeyo
Cover size. You can choose from various thumbnail sizes (small, regular, medium, large) on the album art tab. You can also use ctrl + alt + shift & rotate the mouse wheel for other sizes (see show album art help on the album art tab for more info).

Options dialogue sometimes not opening.

In the last version extra checks were added to test if ShowHtmlDialog is supported, which display of options requires. ShowHtmlDialog should be supported for all users except those running Wine or those who don't want to install internet explorer. The extra checks use regor's getSoFeatures checker. Possibly it sometimes isn't giving the correct answer.

Attached is a debug version. Users experiencing the issue could replace so.js in ...foo_spider_monkey_panel\packages\{E85C9EF0-778B-46DD-AF20-F4BE831360DD}\scripts with the debug version and post the console log when the issue happens to see if it shows anything. Note that so.js in bio & library tree aren't the same.

Hi,WilB,good morning!

The right-click menu fails to open options. I found that there is no problem on win10 system. It cannot be opened on win11, such as 22621.105 and 22621.160. I think it may not open on other win11.

Biography The same problem.

I think it's helpful for your fix,Looking forward to early settlement and sharing!



Title: Re: Library Tree Discussion
Post by: The Chief on 2022-06-28 07:29:34
The right-click menu fails to open options. I found that there is no problem on win10 system. It cannot be opened on win11, such as 22621.105 and 22621.160. I think it may not open on other win11.
Had the same problem on Win10. Problematic code is in panel.js module:

Quote
      if (soFeatures.gecko && soFeatures.clipboard) popUpBox.config(JSON.stringify([this.dialogGrps, this.dialogFiltGrps, this.defViewPatterns, this.defFilterPatterns]), JSON.stringify(ppt), cfgWindow, ok_callback);
      else {
         popUpBox.ok = false;
         $.trace('options dialog isn\'t available with current operating system. All settings in options are available in panel properties. Common settings are on the menu.');   
      }

I've changed it to just:
Quote
      popUpBox.config(JSON.stringify([this.dialogGrps, this.dialogFiltGrps, this.defViewPatterns, this.defFilterPatterns]), JSON.stringify(ppt), cfgWindow, ok_callback);

It works now without any glitch.
Title: Re: Library Tree Discussion
Post by: yeyo on 2022-06-28 10:05:21
The right-click menu fails to open options. I found that there is no problem on win10 system. It cannot be opened on win11, such as 22621.105 and 22621.160. I think it may not open on other win11.
Had the same problem on Win10. Problematic code is in panel.js module:

Quote
      if (soFeatures.gecko && soFeatures.clipboard) popUpBox.config(JSON.stringify([this.dialogGrps, this.dialogFiltGrps, this.defViewPatterns, this.defFilterPatterns]), JSON.stringify(ppt), cfgWindow, ok_callback);
      else {
         popUpBox.ok = false;
         $.trace('options dialog isn\'t available with current operating system. All settings in options are available in panel properties. Common settings are on the menu.');   
      }

I've changed it to just:
Quote
      popUpBox.config(JSON.stringify([this.dialogGrps, this.dialogFiltGrps, this.defViewPatterns, this.defFilterPatterns]), JSON.stringify(ppt), cfgWindow, ok_callback);

It works now without any glitch.
I'll try your method, thank you!
Title: Re: Library Tree Discussion
Post by: WilB on 2022-06-28 13:44:59
@The Chief  @yeyo or anybody else affected by the options dialog issue. I've uploaded a test version here (https://github.com/Wil-B/Library-Tree/blob/main/Library-Tree-v2.3.2-beta.zip). Click the download button. Please can you confirm that the options dialog always now opens correctly? I'm not able to reproduce the issue hence the test version, but then I don't have win11.

The features check is now done on the first use of the options dialog during a particular session, rather than during start-up as suggested by @regor . If it still isn't robust, then likely I'll remove the features checker & add a manual setting to panel properties for affected users, e.g. those using Wine.
Title: Re: Library Tree Discussion
Post by: The Chief on 2022-06-28 18:03:35
I've uploaded a test version here. Click the download button. Please can you confirm that the options dialog always now opens correctly?
It works correctly for me (Win10 LTSC 21H2).
Title: Re: Library Tree Discussion
Post by: yeyo on 2022-06-29 02:16:02
@The Chief  @yeyo or anybody else affected by the options dialog issue. I've uploaded a test version here (https://github.com/Wil-B/Library-Tree/blob/main/Library-Tree-v2.3.2-beta.zip). Click the download button. Please can you confirm that the options dialog always now opens correctly? I'm not able to reproduce the issue hence the test version, but then I don't have win11.

The features check is now done on the first use of the options dialog during a particular session, rather than during start-up as suggested by @regor . If it still isn't robust, then likely I'll remove the features checker & add a manual setting to panel properties for affected users, e.g. those using Wine.
Feedback from the test version: when two library trees are used in a topic interface, only one of them can be opened, and the other still cannot be opened.
PS:It is recommended to completely remove the function checker.
Title: Re: Library Tree Discussion
Post by: regor on 2022-06-29 08:51:18
@The Chief  @yeyo or anybody else affected by the options dialog issue. I've uploaded a test version here (https://github.com/Wil-B/Library-Tree/blob/main/Library-Tree-v2.3.2-beta.zip). Click the download button. Please can you confirm that the options dialog always now opens correctly? I'm not able to reproduce the issue hence the test version, but then I don't have win11.

The features check is now done on the first use of the options dialog during a particular session, rather than during start-up as suggested by @regor . If it still isn't robust, then likely I'll remove the features checker & add a manual setting to panel properties for affected users, e.g. those using Wine.
Feedback from the test version: when two library trees are used in a topic interface, only one of them can be opened, and the other still cannot be opened.
PS:It is recommended to completely remove the function checker.

Testing exactly the same, works with no problems on win 10. Did you update both panels? Does the console warn about options not being available?
Spoiler (click to show/hide)

It makes no sense to have one working and another one not working due to the same function, and in any case if that's the problem then that's a SMP bug which should be fixed (not just remove it).

EDIT: have refactored the code (separated clipboard restoration from the check) and reused your parent doc html file. If it fails with that file, then options popup will simply not work properly in any case (unknown reason), so it will be SMP's/win 11 fault and should be fixed.
Code: [Select]
	isHtmlDialogSupported() {
if (this.soFeat.checked) return this.soFeat.gecko && this.soFeat.clipboard;
else this.soFeat.checked = true;

if (typeof doc === 'undefined' || !doc) {
this.soFeat.gecko = false;
}
if (this.soFeat.gecko) {
let cache = null;
let clText = 'test';
try {
cache = doc.parentWindow.clipboardData.getData('Text');
} catch (e) {}
try {
doc.parentWindow.clipboardData.setData('Text', clText);
clText = doc.parentWindow.clipboardData.getData('Text');
} catch (e) {
this.soFeat.clipboard = false;
}
if (cache) { // Just in case previous clipboard data is needed
try {
doc.parentWindow.clipboardData.setData('Text', cache);
} catch (e) {}
}
if (clText !== 'test') {
this.soFeat.clipboard = false;
}
} else {
this.soFeat.clipboard = false;
}
return this.soFeat.gecko && this.soFeat.clipboard;
}

Attached the file in case anyone wants to test it.
Title: Re: Library Tree Discussion
Post by: WilB on 2022-06-29 11:08:35
@yeyo

If possible I would like to keep an auto check of features.

So can we have one more go before I'll likely make it a manual setting in panel properties (which only Wine users etc. whose systems don't suport ShowHtmlDialog will have to set on a one time basis)?

1) In v1.3.2 beta would you mind replacing popupbox.js in ...foo_spider_monkey_panel\packages\{E85C9EF0-778B-46DD-AF20-F4BE831360DD}\scripts with the @regor  version above to see if that fixes the issue?

2) If it still fails to open options, can you insert the following return true on line 53, after isHtmlDialogSupported() {,  of the @regor popupbox.js to bypass the check & confirm that the options then opens correctly.
Code: [Select]
	isHtmlDialogSupported() {
return true;
Title: Re: Library Tree Discussion
Post by: WilB on 2022-06-29 15:58:13
@yeyo You'll need to restart foobar2000 after changing popupbox.js to ensure the new version is applied to the panels.
Title: Re: Library Tree Discussion
Post by: yeyo on 2022-06-30 03:22:11
@yeyo

If possible I would like to keep an auto check of features.

So can we have one more go before I'll likely make it a manual setting in panel properties (which only Wine users etc. whose systems don't suport ShowHtmlDialog will have to set on a one time basis)?

1) In v1.3.2 beta would you mind replacing popupbox.js in ...foo_spider_monkey_panel\packages\{E85C9EF0-778B-46DD-AF20-F4BE831360DD}\scripts with the @regor  version above to see if that fixes the issue?
v1.3.2 beta + replacing popupbox.js,Right click option still cannot be opened normally
2) If it still fails to open options, can you insert the following return true on line 53, after isHtmlDialogSupported() {,  of the @regor popupbox.js to bypass the check & confirm that the options then opens correctly.
Code: [Select]
	isHtmlDialogSupported() {
return true;
Use code:
Code: [Select]
	isHtmlDialogSupported() {
return true;
Replace the original code(52-54 line):
Code: [Select]
	isHtmlDialogSupported() {
if (this.soFeat.checked) return this.soFeat.gecko && this.soFeat.clipboard;
else this.soFeat.checked = true;
Can work normally

My operating system platform:
edition:Windows 11 professional 22H2
Operating system version:22621.160

Title: Re: Library Tree Discussion
Post by: regor on 2022-06-30 08:25:31
Code: [Select]
	isHtmlDialogSupported() {
if (this.soFeat.checked) return this.soFeat.gecko && this.soFeat.clipboard;
else this.soFeat.checked = true;

Point is that code check replacement is not entirely true. Being able to open the HTML popup after a restart doesn't equal to the check failing, since both are run at different times. The thing required here is to output to console both this.soFeat.gecko, this.soFeat.clipboard and then force opening the HTML popup.

Also even if one of them fails and the HTML popup works, that's not meant to point to a feature checking failure. On win 7 for ex. you need both features working properly to show an HTML popup, the same in Wine. If soFeat.clipboard fails an that doesn't matter in Win 11 to show a popup then:

1. Maybe Win 11 have different requisites?
2. In any case, there is a bug on win 11. You may bypass it there removing the check and it will appear at other places of the code using the clipboard. (SMP will introduce new method so it may not be a problem).
3. It still makes zero sense to have the same line working in one panel and not the other.
Title: Re: Library Tree Discussion
Post by: regor on 2022-06-30 08:46:48
Try this one and then paste the console logs (and report in which cases the popup opened).

The check is performed everytime you use the menu entry, not cached, so multiple tries may make it work.

If the HTML popup works and the console outputs one of the variable as false, there is a bug on win 11 or SMP.

On win7 and win10 it works flawlessly with 2 panels.
Spoiler (click to show/hide)
Title: Re: Library Tree Discussion
Post by: yeyo on 2022-07-01 09:09:39
Try this one and then paste the console logs (and report in which cases the popup opened).

The check is performed everytime you use the menu entry, not cached, so multiple tries may make it work.

If the HTML popup works and the console outputs one of the variable as false, there is a bug on win 11 or SMP.

On win7 and win10 it works flawlessly with 2 panels.
Spoiler (click to show/hide)
Library-Tree-v2.3.2-beta + popupbox.js
Test results:
2 panels can open the options page normally,On win11
console outputs:
soFeat.gecko true soFeat.clipboard true
Title: Re: Library Tree Discussion
Post by: regor on 2022-07-01 09:27:51
Your report doesn't show a problem then (?)

So unless you want to keep trying testing it until there is a false and the options panel opens right... there is nothing more to do since that seems a WIN 11/SMP bug.
Title: Re: Library Tree Discussion
Post by: yeyo on 2022-07-01 11:51:12
Y
Your report doesn't show a problem then (?)

So unless you want to keep trying testing it until there is a false and the options panel opens right... there is nothing more to do since that seems a WIN 11/SMP bug.
yes,eport doesn't show a problem,100% hit open
Title: Re: Library Tree Discussion
Post by: regor on 2022-07-01 12:01:54
Y
Your report doesn't show a problem then (?)

So unless you want to keep trying testing it until there is a false and the options panel opens right... there is nothing more to do since that seems a WIN 11/SMP bug.
yes,Report doesn't show a problem,100% hit open
(?) The problem is not the popup opening or not, as I said you must show BOTH the console reporting a false and the popup opening. And only if that happens, there is a bug somewhere.
Title: Re: Library Tree Discussion
Post by: WilB on 2022-07-01 17:30:32
As the options dialog issue has been dragging on, the simplest solution seems to be to add a confirm for the occasional times when the feature checker reports Spider Monkey Panel Show HTML Dialog as unsupported. This would be a one-time check per panel.
Title: Re: Library Tree Discussion
Post by: WilB on 2022-07-04 12:37:07
New Version: Library Tree v2.3.2 (https://github.com/Wil-B/Library-Tree/releases)

Changelog (https://github.com/Wil-B/Library-Tree/blob/main/CHANGELOG.md)
Title: Re: Library Tree Discussion
Post by: yeyo on 2022-07-04 16:37:46
New Version: Library Tree v2.3.2 (https://github.com/Wil-B/Library-Tree/releases)

Changelog (https://github.com/Wil-B/Library-Tree/blob/main/CHANGELOG.md)
Thank you for updating. When show HTML dialog is set to 1 or 2, it works well. 0 cannot work. Is it related to the fact that win11 does not support IE?
Title: Re: Library Tree Discussion
Post by: TT on 2022-07-04 16:51:51
@yeyo,

0 = Unsupported
1 = Supported
2 = Autocheck

This is only meant for Linux users, leave it at 2. I guess if Autocheck for Linux users fails, it will automatically switch to 0.

-TT
Title: Re: Library Tree Discussion
Post by: WilB on 2022-07-04 16:58:51
@yeyo

0 sets Show Html Dialog as unsupported. It doesn't attempt to load options to avoid errors on systems like Wine that don't support it. You need it on 1 as clearly it's supported on your system.

Most users shouldn't have to be concerned about the feature check. It should happen without any user interaction and be correctly set in the background. Only in occasional cases when the feature checker detects Show Html Dialog as unsupported will a popup appear which gives the opportunity to confirm & exclude a false negative etc.

The autocheck runs on first use when the panel property value is set to 2. It's a one time check and will then be set to 1 or 0. If it's 0 (unsupported), then you'll get the one time confirm as above.  Setting the panel property to 2 will redo the autocheck.
Title: Re: Library Tree Discussion
Post by: yeyo on 2022-07-21 08:46:20
I don't know if there are too many album covers. When starting the fb2k program, lt has a certain probability that the program will not respond and cannot be loaded and started normally
Title: Re: Library Tree Discussion
Post by: WilB on 2022-07-21 12:45:11
There is an option to preload cached images (album art tab).  You can try ensuring it's off.  You can read about it in the help on that tab. Default is currently off, although in some earlier versions default was on and that setting may have persisted.

If preload is off, only the few displayed images are loaded.
Title: Re: Library Tree Discussion
Post by: yeyo on 2022-07-22 02:49:58
There is an option to preload cached images (album art tab).  You can try ensuring it's off.  You can read about it in the help on that tab. Default is currently off, although in some earlier versions default was on and that setting may have persisted.

If preload is off, only the few displayed images are loaded.
preload cached images It is always turned off, only the disk cache is turned on
I try to check open and then uncheck close,THX!
Title: Re: Library Tree Discussion
Post by: mjm716 on 2022-07-24 08:32:51
New Version: Library Tree v2.3.2 (https://github.com/Wil-B/Library-Tree/releases)


I'm having trouble displaying sub-item counts. options>display>item_counts is set to display #sub-items, but no count appears.
e.g. using %<genre>%|[%<ALBUM GENRE LAST.FM>%]

Also is there an argument I can call related to item count? e.g. $nodisplay{$if(count<5)}
Title: Re: Library Tree Discussion
Post by: WilB on 2022-07-25 10:43:54
It assumes the last item of a view pattern is a track & so doesn't display the counts. For comparison DUI album list seems to behave the same way.

The solution is to use a full view pattern, e.g.
Code: [Select]
%<genre>%|%<ALBUM GENRE LAST.FM>%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
Full view patterns also ensure the tracks are sorted. If you don't want to display the tracks, set show > tracks (tree) to off (display tab). The above view pattern should then be OK and display the counts.

Alternatively, try something like the following with show tracks enabled:
Code: [Select]
%<genre>%|%<ALBUM GENRE LAST.FM>%|[%album artist% - ]%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
$nodisplay doesn't support the counts argument. For a clean tree view of last.fm genres, it's best to use the bio last.fm tagger whitelist when writing the tags: that's why I added it. Whitelist usage is optional in the next version of bio.
Title: Re: Library Tree Discussion
Post by: dani56 on 2022-08-09 18:17:28
Hello, I hope this is the right place to post this.

I am having trouble grouping my music in a custom pattern.
I am using the Eole (https://github.com/Ottodix/Eole-foobar-theme) theme, and i realized that I can set up custom views in the Proberties window when I SHIFT+Right-Click the Panel.
X

Now I want to group my Music files By Genre. For that I added 2 Custom ID3 Tags to my Audiofiles, which are %subgenre1% and %subgenre2%. I am also using the %genre% -Field. Now, I want to group my files by these Fields, like this:

X

Which does work if i use the Pattern:

Code: [Select]
Test // %genre%|%subgenre1%|%subgenre2%|%artist% - %title%

(In this case, the genre is Metal, the Subgenre1 is Death Metal and the Subgenre2 is Melodic Death Metal)

X



However, I dont have all 3 tags on every MP3 File. All Files have the %genre% tag, but not all of them have the %subgenre1% tag and not all of those have the %subgenre2% tag. So I would like to change the Pattern accordingly:

If theres is only the %genre% tag, the Album should be shown here, but the %subgenre1% should also be shown, below the album, with the other albums which have that tag:


X

If theres is only the %genre% and the %subgenre1% tag, the Album should be shown here, but the %subgenre2% should also be shown, below the album, with the other albums which have that tag:


X

So I tried using IF Statements:

Code: [Select]
Test // $if2([%genre%|],)$if2([%subgenre1%|],)$if2([%subgenre2%|],)%artist% - %title%

But that produces an Output Like that:

X

It seems like the | operator (which creates a new branch I think?) isnt working when there are If clauses used.

With the help of the awesome Plugin Title Formatting Sandbox (https://github.com/stengerh/foo_tfsandbox) I checked the both of the codes and the "output" should be the same:

X
X

Now I am wondering why it is like that. I tried a lot of things, this If clause is the closest I have gotten to a good result, because it also shows the albums which dont have a %subgenre1% or %subgenre2% tag under the right category. The only thing which isnt working is the Branching/Grouping.
(In this example the artist Amon Amarth has the %genre% Tag (Metal), the artist Abinchova has the %genre% Tag and the %subgenre1% Tag (Death Metal) and the artist Aether has the %genre% Tag and the %subgenre1% Tag (Death Metal) and the %subgenre2% Tag (Melodic Death Metal)

X

I know this is a very confusing question, I tried my best to explain it and it took me about 2 hours to create this post. If someone really wants to help me and wants to know more about my problem, feel free to add me on Discord where we can talk and I can stream my screen to you!

Da Buuu#6035















Title: Re: Library Tree Discussion
Post by: WilB on 2022-08-10 12:38:40
I believe eole is using rather an old version of library tree that didn't support conditional branches.

In the current version of library tree both your string & a simpler version should work.

Your string
Code: [Select]
$if2([%genre%|],)$if2([%artist genre allmusic%|],)$if2([%album genre allmusic%|],)%artist% - %title%

Simpler version
Code: [Select]
[%genre%|][%artist genre allmusic%|][%album genre allmusic%|]%artist% - %title%

Tag names changed so I could test it.
Title: Re: Library Tree Discussion
Post by: handleyman on 2022-08-13 22:59:33
The same issue from last year exists with Lyrics?
Everything works fine if you allow if to use the generic save folder, but if you specifiy your own (which I prefer), the lyrics download OK, but do not display. Odd...
Title: Re: Library Tree Discussion
Post by: WilB on 2022-08-26 14:04:45
This doesn't seem related to library tree.

If it's something else of mine, double check that the save paths used by the lyrics plug-in and path on the textreader and lyrics tab match. If the issue persists, I'll need more info. So provide both the save path used by the lyric plug-in and the paths entered in the textreader and lyrics tab, in the appropriate thread.
Title: Re: Library Tree Discussion
Post by: WilB on 2022-08-29 18:24:48
New Version: Library Tree v2.3.3 (https://github.com/Wil-B/Library-Tree/releases)

Added
- Display of item durations for tree and album art views (enable on display tab)
- Intelligent group level sort by year
- Wine: font check

Fixed
- Search text was difficult to read with certain theme and colour combinations

See the changelog (https://github.com/Wil-B/Library-Tree/blob/main/CHANGELOG.md) for full info
Title: Re: Library Tree Discussion
Post by: always.beta on 2022-09-05 16:35:06
Would you consider adding an album expansion mode, similar to iTunes' album view?
Title: Re: Library Tree Discussion
Post by: WilB on 2022-09-05 21:57:21
There may be something in the pipeline. Let's see how it goes.
Title: Re: Library Tree Discussion
Post by: WilB on 2022-09-05 23:54:14
New Version: Library Tree v2.3.4 (https://github.com/Wil-B/Library-Tree/releases)

Minor update that improves compatibility with foobar2000 v2.0
Title: Re: Library Tree Discussion
Post by: always.beta on 2022-09-06 14:09:59
Consider adding a version number to the title bar of the settings panel?
Title: Re: Library Tree Discussion
Post by: Montchenot on 2022-09-06 15:54:42
Thanks, WilB, for bringing your Library Tree to FB2K v2!
I guess it works upon JScript Panel but I couldn't yet find how to apply it there, or to import the package as in the Spider Monkey Panel. I'd appreciate some help
Regards
Title: Re: Library Tree Discussion
Post by: marc2k3 on 2022-09-06 16:15:47
I guess it works upon JScript Panel

No, absolutely not. It requires Spider Monkey Panel.

https://github.com/Wil-B/Library-Tree/tree/main#requirements

Read all of it!
Title: Re: Library Tree Discussion
Post by: Montchenot on 2022-09-06 16:48:31
thanks, Marc but I just couldn't load Columns UI and SMP
Title: Re: Library Tree Discussion
Post by: marc2k3 on 2022-09-06 17:03:45
It's kind of expected people are familiar with adding/removing 3rd party components to Columns UI layout (or default UI).

There are basic guides here

DUI: http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Layout_Editing_Mode

CUI: https://wiki.yuo.be/columns_ui:config:layout (the screenshot is old but you should be able to figure it out)
Title: Re: Library Tree Discussion
Post by: Montchenot on 2022-09-06 18:25:53
I'm talking of foobar2000 v2:
Could not load component  "foo_spider_monkey_panel.fb2k-component": This component was built for a different processor architecture.
Title: Re: Library Tree Discussion
Post by: marc2k3 on 2022-09-06 18:31:33
Well you must be using 64bit v2 then. A rather important detail you didn't think was important enough to mention or any other specifics about the nature of your problem. You're quite the time waster.

foobar2000 changelog, first line....

Quote
Now available as x86 32-bit (legacy), x86 64-bit. ARM 64-bit version coming soon. 64-bit versions require updated versions of add-on components.
Title: Re: Library Tree Discussion
Post by: always.beta on 2022-09-10 12:16:43
Bug repro:
Enable any filter, enter an artist that does not exist in the library, the search results are empty, restart fb2k, trigger the configuration of the library
Title: Re: Library Tree Discussion
Post by: TT on 2022-09-10 12:39:21
Bug repro:
Enable any filter, enter an artist that does not exist in the library, the search results are empty, restart fb2k, trigger the configuration of the library

@WilB, I've had something similar on my modified Library, needed to add an extra condition ( if items exist, panel.list.Count ) in the rootNodes(lib_update, process) func:
Code: [Select]
if (panel.imgView && total) img.load(); // * Prevent crash if nothing was found in search query, search still active/not cleared and loading album art on next reload

-TT
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2022-09-15 06:31:25
Hi...

246 / 5.000
Übersetzungsergebnisse
With the library tree I show the other albums and samplers of the currently playing artist. How can I also show the albums of the second or third or fourth etc. artist if it is a duet. eg: Elton John; Kiki Dee????
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2022-09-15 06:40:53
in the top panel you see the albums and samplers with songs from elton john based on the filter

artist IS $nowplaying{$meta(artist,0)}

is there a chance to display also the albums of kiki dee?
Title: Re: Library Tree Discussion
Post by: blindstitch on 2022-10-12 18:45:14
There's a feature that I am hoping can be made toggleable. Using the arrow keys to move selection up and down begins from where the cursor is on screen. Essentially it's as if a left click is sent before the up/down arrow key event. I can't tell if it's part of the plugin or something inherent to SMP.  If you can point me to the method where the behavior is defined I'll try editing it there.

This behavior doesn't work well with my setup. I use FB2K with an air mouse that has arrow keys. When I use the arrow keys the selection starts from where my cursor is. The air mouse cursor tends to move around as I press the arrow keys, so my selection ends up really bugging out. The way the selection is designed right now it's very hard to use arrow keys to select items.

I admit I am an edge case, and if it's possible I would really like this option to be toggleable in a future build. I am definitely sticking with this plugin in the future as it seems to be the best of the tree browser extensions.
Title: Re: Library Tree Discussion
Post by: WilB on 2022-10-15 19:36:47
@DJ FRANK G.
Assuming the names are in multi-value tags then try something like:
artist IS $nowplaying{$meta(artist,0)} OR artist IS $nowplaying{$meta(artist,1)}
Extend according to the number of multi-value tags.

@blindstitch
It's handled by the variable panel.pos in populate.js
panel.pos is set on lbtn_dn (~1245) & lbtn_up (~1276).
You could try commenting those out, but panel.pos is used for other things. May be it'll be OK. You'll have to test it.
It's used by vk.dn (~1659), vk.up (1660), vk.left (~1542), vk.right (~1577)

@always. beta
I could reproduce this issue. It seems that it's due to changes in library handling in foobar2000 v2, as all seems OK in 1.6.12. The next version should have a fix.

@TT  I've added that as well.
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2022-10-17 06:45:38
@DJ FRANK G.
Assuming the names are in multi-value tags then try something like:
artist IS $nowplaying{$meta(artist,0)} OR artist IS $nowplaying{$meta(artist,1)}
Extend according to the number of multi-value tags.

Hi, thanx that works fine, but only with 2 artist. Can't work with 1 artist only:



Title: Re: Library Tree Discussion
Post by: WilB on 2022-10-17 11:42:06
Thanks for the feedback. It should be fixed for the next version.
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2022-10-20 19:46:50
Thanx for you great work...

Another question: is it possible to filter the selection instead of $nowplaying???
Title: Re: Library Tree Discussion
Post by: WilB on 2022-10-21 01:08:52
Where is the selection? What do you want to filter by? Maybe you mean the selected track in a playlist rather than the playing track? Something like:
Code: [Select]
artist IS $selected{$meta(artist,0)}

Please confirm what you mean.
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2022-10-21 19:01:49
Ok, I use your playlist tree to show the tracklist (1) from the nowplaying album (2). Between the two panels i show the releases (3) of the nowplaying artist. After click on a release, i wish to change the tracklist (1) to the selected release... ;)

my filter for the nowplaying CD is

album IS $nowplaying{$meta(album,0)} AND album date IS $nowplaying{$meta(album date,0)} AND album artist IS $nowplaying{$meta(album artist,0)} AND medium IS $nowplaying{$meta(medium,0)}

the filter:

album IS $selected{$meta(album,0)} AND album date IS $selected{$meta(album date,0)} AND album artist IS $selected{$meta(album artist,0)} AND medium IS $selected{$meta(medium,0)}

doesen't work for the selected release






Title: Re: Library Tree Discussion
Post by: WilB on 2022-10-22 01:19:26
$selected isn't implemented & was a suggestion to see if it might be suitable.

However, there may be a better way.

Create another library tree panel in a tab next to TRACKLIST. Call it, e.g., SELECTED & set it to show tracks.

Then for the SELECTED panel set the source to panel: menu > source > panel.

The selected release from the nowplaying panel should then be received and displayed by the SELECTED panel. You may want to set in options > behavior > single-click to select for the nowplaying panel, so items aren't sent to a playlist.

Then you can just toggle between the tabs which would be better than changing filters, I think.
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2022-10-22 17:17:33
Many thanks...
that works in principle. But after the track change, the last selected entry is retained. Only when you click on an entry in "Selected" again will it be updated.
Is there a way other than clicking "send to playlist", e.g. when changing tracks, the current album is marked. Can it be programmed in such a way that this filter is automatically sent to the playlist? Look at the video, please...

https://youtu.be/3F9mK70z46M (https://youtu.be/3F9mK70z46M)
Title: Re: Library Tree Discussion
Post by: mjm716 on 2022-11-18 22:46:06
$selected isn't implemented & was a suggestion to see if it might be suitable.


+1 for $selected direction.

I tried your other suggestion as a means of displaying matching library items to the selection, but it doesn't quite filter as $nowplaying.
Title: Re: Library Tree Discussion
Post by: ApacheReal on 2022-12-23 07:32:44
Hello.
I have two problems with the latest version of library tree as soon as I launch foobar2000 beta 19.
The first I have a script that appears see image.

(https://i.ibb.co/vxM4HXt/Immagine-2022-12-23-081808.png) (https://imgbb.com/)

The second is that I have to reload to have the order I pre-established which would be the folder structure.
Solutions?
Title: Re: Library Tree Discussion
Post by: regor on 2022-12-23 09:50:57
Hello.
I have two problems with the latest version of library tree as soon as I launch foobar2000 beta 19.
The first I have a script that appears see image.

(https://i.ibb.co/vxM4HXt/Immagine-2022-12-23-081808.png) (https://imgbb.com/)

The second is that I have to reload to have the order I pre-established which would be the folder structure.
Solutions?
That is not an "error". It's a SMP feature when scripts take too much time, you can tune it at the SMP preferences. Just click continue.

Can not reproduce your problem (view by folder) on 1.6 so it may be related to the beta changes to library. Which version of the script are you using?
Title: Re: Library Tree Discussion
Post by: ApacheReal on 2022-12-23 10:32:18
Hello.
I have two problems with the latest version of library tree as soon as I launch foobar2000 beta 19.
The first I have a script that appears see image.

(https://i.ibb.co/vxM4HXt/Immagine-2022-12-23-081808.png) (https://imgbb.com/)

The second is that I have to reload to have the order I pre-established which would be the folder structure.
Solutions?
That is not an "error". It's a SMP feature when scripts take too much time, you can tune it at the SMP preferences. Just click continue.

Can not reproduce your problem (view by folder) on 1.6 so it may be related to the beta changes to library. Which version of the script are you using?

SMP v1.6.1
https://ibb.co/4p55Tkf (https://ibb.co/4p55Tkf)
Title: Re: Library Tree Discussion
Post by: regor on 2022-12-23 10:47:04
Hello.
I have two problems with the latest version of library tree as soon as I launch foobar2000 beta 19.
The first I have a script that appears see image.

(https://i.ibb.co/vxM4HXt/Immagine-2022-12-23-081808.png) (https://imgbb.com/)

The second is that I have to reload to have the order I pre-established which would be the folder structure.
Solutions?
That is not an "error". It's a SMP feature when scripts take too much time, you can tune it at the SMP preferences. Just click continue.

Can not reproduce your problem (view by folder) on 1.6 so it may be related to the beta changes to library. Which version of the script are you using?

SMP v1.6.1
https://ibb.co/4p55Tkf (https://ibb.co/4p55Tkf)
Not SMP, but the library tree package :)

Btw the slow script warning option:
Spoiler (click to show/hide)
Title: Re: Library Tree Discussion
Post by: ApacheReal on 2022-12-23 11:31:28
Hello.
I have two problems with the latest version of library tree as soon as I launch foobar2000 beta 19.
The first I have a script that appears see image.

(https://i.ibb.co/vxM4HXt/Immagine-2022-12-23-081808.png) (https://imgbb.com/)

The second is that I have to reload to have the order I pre-established which would be the folder structure.
Solutions?
That is not an "error". It's a SMP feature when scripts take too much time, you can tune it at the SMP preferences. Just click continue.

Can not reproduce your problem (view by folder) on 1.6 so it may be related to the beta changes to library. Which version of the script are you using?

SMP v1.6.1
https://ibb.co/4p55Tkf (https://ibb.co/4p55Tkf)
Not SMP, but the library tree package :)

Btw the slow script warning option:
Spoiler (click to show/hide)

Thank you.

Library-Tree-v2.3.4

The script message problem is solved
setting the slow script to 20 seconds (was 5 seconds)

The second problem remains.

While setting the view by folder, on the first run, I find another type of sorting.

I have to set the order by folder every time.

Title: Re: Library Tree Discussion
Post by: regor on 2022-12-23 18:05:25
Hello.
I have two problems with the latest version of library tree as soon as I launch foobar2000 beta 19.
The first I have a script that appears see image.

(https://i.ibb.co/vxM4HXt/Immagine-2022-12-23-081808.png) (https://imgbb.com/)

The second is that I have to reload to have the order I pre-established which would be the folder structure.
Solutions?
That is not an "error". It's a SMP feature when scripts take too much time, you can tune it at the SMP preferences. Just click continue.

Can not reproduce your problem (view by folder) on 1.6 so it may be related to the beta changes to library. Which version of the script are you using?

SMP v1.6.1
https://ibb.co/4p55Tkf (https://ibb.co/4p55Tkf)
Not SMP, but the library tree package :)

Btw the slow script warning option:
Spoiler (click to show/hide)

Thank you.

Library-Tree-v2.3.4

The script message problem is solved
setting the slow script to 20 seconds (was 5 seconds)

The second problem remains.

While setting the view by folder, on the first run, I find another type of sorting.

I have to set the order by folder every time.


Have not been able to reproduce your problem, if I set folder view, it gets stuck at that everytime I reload the panel BUT maybe this setting is unchecked?
Spoiler (click to show/hide)
Title: Re: Library Tree Discussion
Post by: regor on 2022-12-23 18:27:39
@ WilB Tried to open an issue for this on github but they are disabled.. anyway, while using your plugin noticed your current quick search behavior was similar to my (old) one on Playlist Manager. i.e. pressing a key, searches for that letter; continue pressing, caches the entire string. BUT when you press the same key multiple times, they are concantenated...(aaa...).

That behavior is usually non desired, and in fact both CUI and DUI album lists jump to the next item when pressing the same key multiple times.
Spoiler (click to show/hide)

I added settings switches to jump to next items on multiple presses of the same key and another one to cycle once it reaches the last one, so it mimics the CUI/DUI panels but can also be disabled. Thought you could be interested on doing something similar
Spoiler (click to show/hide)
Title: Re: Library Tree Discussion
Post by: ApacheReal on 2022-12-24 07:02:08
Hello.
I have two problems with the latest version of library tree as soon as I launch foobar2000 beta 19.
The first I have a script that appears see image.

(https://i.ibb.co/vxM4HXt/Immagine-2022-12-23-081808.png) (https://imgbb.com/)

The second is that I have to reload to have the order I pre-established which would be the folder structure.
Solutions?
That is not an "error". It's a SMP feature when scripts take too much time, you can tune it at the SMP preferences. Just click continue.

Can not reproduce your problem (view by folder) on 1.6 so it may be related to the beta changes to library. Which version of the script are you using?

SMP v1.6.1
https://ibb.co/4p55Tkf (https://ibb.co/4p55Tkf)
Not SMP, but the library tree package :)

Btw the slow script warning option:
Spoiler (click to show/hide)

Thank you.

Library-Tree-v2.3.4

The script message problem is solved
setting the slow script to 20 seconds (was 5 seconds)

The second problem remains.

While setting the view by folder, on the first run, I find another type of sorting.

I have to set the order by folder every time.


Have not been able to reproduce your problem, if I set folder view, it gets stuck at that everytime I reload the panel BUT maybe this setting is unchecked?
Spoiler (click to show/hide)

Yes, I have this option set on exit.

But on the first reboot, the order I indicated is not maintained.

I have to reload to get the order I chose
Title: Re: Library Tree Discussion
Post by: regor on 2022-12-24 11:31:01
I don't have access to the configuration HTML panel, so can not really help you but... is this true? (on properties)
Spoiler (click to show/hide)
Title: Re: Library Tree Discussion
Post by: ApacheReal on 2022-12-24 12:16:12
I don't have access to the configuration HTML panel, so can not really help you but... is this true? (on properties)
Spoiler (click to show/hide)

I tried changing that parameter from false to true, but the problem remains.

At the first instance of sorting by folder, the subfolders also appear.

Only the root folder appears with the reload.
Title: Re: Library Tree Discussion
Post by: AlienRobot on 2023-01-01 02:44:13
Is there a way to prevent all of the nodes from auto-collapsing after I search and then go back to the main tree?
Title: Re: Library Tree Discussion
Post by: Gabohar on 2023-01-25 06:53:21
Hi!, I was searching a complement similar to Facets and I tried Library Tree. I have a question:

Is it possible to make 3 columns: Artist Main Folder --> Artist sub folders --> Albums with cover arts and order by year?

In facets I can get that using in the first two colums the folder structure, but in Library Tree was impossible for me 'cause always shows the subfolders files (.cue files and audio files that I don't want to be showed). I don't find how to show statics like the size of the main artist folder or duration of the albums in the third column too.

This is my actual layout using facets and JS Playlist, I would like to achieve something close to that o even better if it's possible with Library Tree or another component.

(https://i.ibb.co/FKcpfwD/captura-foobar2000-facets.jpg) (https://ibb.co/FKcpfwD)
Title: Re: Library Tree Discussion
Post by: regor on 2023-02-03 18:10:27
There is a bug at interface.js line 434
Code: [Select]
	getFont() {
const RunningWine = () => utils.IsFile('Z:\\bin\\bash' || 'Z:\\bin\\ls' || 'Z:\\bin\\sh' || 'Z:\\etc\\fstab'); /* detects if user is running Wine on Linux or MacOs, default Wine mount point is Z:\ */

Where if you have a drive witch such letter, like a virtual drive or a CD drive, utils.IsFile crashes.
https://github.com/TheQwertiest/foo_spider_monkey_panel/issues/192

It's funny just happened to me today, because I usually name my virtual drives in reverse starting from Z! Problem is the error appears at startup, so most users would not be able to bypass it.

There are probably other multiple places like that. This method, along IsFolder, etc. should always be wrapped inside try / catch.
Title: Re: Library Tree Discussion
Post by: TT on 2023-02-03 20:32:06
@regor, yea this was my old helper I've provided WilB ;-)

Remember, we updated it with your additional code:

Code: [Select]
/**
 * @returns {boolean} Detects if user is running Wine on Linux or MacOs, default Wine mount point is Z:\
 */
const DetectWine = () => {
const diskLetters = Array.from(Array(26)).map((e, i) => i + 65).map((x) => `${String.fromCharCode(x)}:\\`);
const paths = ['bin\\bash', 'bin\\ls', 'bin\\sh', 'etc\\fstab'];
return diskLetters.some((d) => {
try { // Needed when permission error occurs and current SMP implementation is broken for some devices....
return IsFolder(d) ? paths.some((p) => IsFile(d + p)) : false;
} catch (e) { return false; }
});
}

Forgot to tell @WilB to update his...

-TT
Title: Re: Library Tree Discussion
Post by: WilB on 2023-02-20 11:46:30
@AlienRobot
I have added the necessary search memory to the next version.

@Gabohar
Next version has a new facets mode and allows use of any number of panels chained together. It also has statistics.

@regor
I've added the new jump search method. Thanks for the info.

@TT
@regor
Thanks for report and updated code snippet which will be in the next version.

@ApacheReal

Like @regor I have been unable to reproduce the issue.

If the problem persists can you open panel properties and clear all properties to reset the configuration (export properties first if you have made significant changes so you have a backup)?

If the issues still occurs, from your description it looks like it might be due to use of fb2k v2 (beta). So you could try foobar2000 1.6.16 to see if that solves it.

How the library initialises on foobar2000 start-up in v2 seems to have changed compared with earlier versions, although I know plenty of people for whom it works fine - in fact this is the only report I'm aware of where there might be an issue. v2 will require the advanced setting 'Auto-sync with library changes' left enabled.

Next version checks the fb2k version before deciding how to handle the library and has extra  checks and balances as well.
Title: Re: Library Tree Discussion
Post by: always.beta on 2023-02-23 00:56:20
Can you add the following selection setting in the list view?

Next version has a new facets mode and allows use of any number of panels chained together. It also has statistics.
Sounds very exciting!
Title: Re: Library Tree Discussion
Post by: WilB on 2023-05-13 13:09:40
New Version: Library Tree v2.4.0 (https://github.com/Wil-B/Library-Tree/releases)

Release highlights:

- New facets / multi-panel mode
   - includes album art browser
- Statistics
- Mode presets
         - browser: keeps playing playlist
         - player: play from library without using a playlist: easy management
         - default: free choice of actions

See changelog (https://github.com/Wil-B/Library-Tree/blob/main/CHANGELOG.md) for more info

Current feature set and gallery (https://github.com/Wil-B/Library-Tree)
Title: Re: Library Tree Discussion
Post by: ApacheReal on 2023-05-13 17:48:05
THX.

(https://i.postimg.cc/z3SYBqK5/Immagine-2023-05-13-184323.png) (https://postimg.cc/z3SYBqK5)
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2023-05-13 20:58:16
sounds interesting...

i can't import the package: Corrupted package: can't find `package.json`
Title: Re: Library Tree Discussion
Post by: always.beta on 2023-05-14 04:07:53
For each panel press shift + windows key, choose configure & on the scripts tab set the panel name of the first panel to Genre, the second to Artist and the third to Album
Is this statement wrong? Modify the name directly at the top panel.
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2023-05-14 16:34:08
sounds interesting...

i can't import the package: Corrupted package: can't find `package.json`
I used a new portable Installation with the same problem
Title: Re: Library Tree Discussion
Post by: DJ FRANK G. on 2023-05-14 17:40:36
ok. i downloaded the wrong zip.  :'(
Title: Re: Library Tree Discussion
Post by: always.beta on 2023-05-16 15:22:53
Thank you so much for your effort, it's been great.
Panel settings-behavior, when the expanded mode helps, the bottom button drop-down box is misplaced.
What is the function of the shortcut key ctrl+backspace? Embarrassing, didn't test it out.
Title: Re: Library Tree Discussion
Post by: WilB on 2023-05-18 12:50:14
@always.beta
Quote
Is this statement wrong.
It's correct, edit button can be used, else I misunderstand. Sounds like you sorted it any way.

Quote
Panel settings-behavior, when the expanded mode helps, the bottom button drop-down box is misplaced.
I couldn't see anything, I think its just shunted down? may be I misunderstood you, so you'll need to explain more if there is a cosmetic issue.

Ctrl + backspace deletes the word before the cursor in the search box.
Title: Re: Library Tree Discussion
Post by: regor on 2023-05-18 13:11:14
Is there some way to avoid creating cache playlists for multiple facets panels? While it may be fine on single playlist themes (with dropdown playlist selectors), for people using playlist tabs, polluting the tabs with these playlists is a big downside (the same applies to the find&play cache in fact).
Title: Re: Library Tree Discussion
Post by: WilB on 2023-05-18 13:51:10
I tried a few ways of doing this, using json etc, but all lacked performance since handleList isn't saved. Unless you know a way. fpl format is fast. If they could be separately saved and read it would resolve the issue - something I believe you have requested for smp
Title: Re: Library Tree Discussion
Post by: regor on 2023-05-18 18:48:04
Yep.. had the same problem with the playlist manager -to load playlist files- and my "solution" was caching the entire library to find matches by path as fast as the native methods. Then you can simple save the track paths in plain txt files and load the handle.
Code: [Select]
helpers_xxx_playlist_files ->precacheLibraryPaths
pathTF = '$put(path,$replace(%_PATH_RAW%,\'file://\',))$if($stricmp($ext($get(path)),iso),\',\'%SUBSONG%,)';
// iterate over entire library (I would do it with serial promises to not freeze the UI)
paths_i = fb.TitleFormat(pathTF).EvalWithMetadbs(iItems);
paths = [...paths_i]

helpers_xxx_playlist_files ->getHandlesFromPlaylist
//As long as the library has not changed from the moment you cache the paths then the idx at path is equal to the idx at pool
pool = fb.GetLibraryItems();
idx = find matches by path in the cache
handlePlaylist[i] = pool[idx];

Not suggesting you to do so, just saying it can be done with the current tools for some use-cases. In my use-case it works fine because I rebuild the cache if items are added/deleted to the library during the same session (so it doesn't break playlists, loading the wrong handle). And losing 5 secs on the background to have instant playlist loading during a session is acceptable for me (I also share the same cache between different panels).

Spoiler (click to show/hide)

As far as I understand your usage, the cache can be on a handleList during the same session and you only need the playlist on startup (?). That would replace its usage, although it would need a few seconds to initialize.

Clearly an addLocations method to load things as handleList would be required here, being much easier. Also a method to save fpl playlists without the dialog input.
Title: Re: Library Tree Discussion
Post by: always.beta on 2023-05-19 07:23:46
so you'll need to explain more if there is a cosmetic issue.
Sorry, my English is poor, see below.
Title: Re: Library Tree Discussion
Post by: WilB on 2023-05-21 17:52:58
Thanks, I understand now.
Title: Re: Library Tree Discussion
Post by: Azuriye on 2023-05-25 21:59:54
Hello! Thanks a lot for this great plugin, I've just moved from v1.3.3 to v1.4.1 and seem to be having a slight issue...

For some reason when I use the Library Tree and set it to View by Folder Structure and click on a folder which contains all my albums when I send it to the playlist, it loads up correctly in chronological order at my playlist panel.

For reference, I attached the desired effect which is appropriately displayed as 1.png

Now when I close fb2k and re-open it and then do the same as above suddenly the entire order is changed and it gets reversely ordered basically in descending order.

I attached 2.png showing the issue of it being incorrectly displayed.

If inspect it further it looks like the first album is the last in my playlist and the last album is the first in my playlist and the ordering is still in descending order instead of ascending.

3.png shows what's the first album in my playlist after I've sent it from Library Tree to the Playlist panel (not to be confused everything is in the reverse order now using 2.png and 3.png as context!)

Surprisingly enough when I hit Reload on the Library Tree and do the above same steps the issue is no longer present and displays all the albums in ascending order or as 1.png... any idea what could be causing this?
Title: Re: Library Tree Discussion
Post by: WilB on 2023-05-26 12:29:45
Sounds like the playlist is force sorting.
Title: Re: Library Tree Discussion
Post by: Azuriye on 2023-05-26 21:21:18
Sounds like the playlist is force sorting.

Thanks a lot! That helped me round out the issue and I've set it to sort to %path_sort% and the issue no longer persists.
Title: Re: Library Tree Discussion
Post by: ApacheReal on 2023-05-27 16:21:10
%path_sort% should it be put in the menu views in pattern?
Title: Re: Library Tree Discussion
Post by: kahel on 2023-05-28 12:46:54
Some nice addition... enjoying trying it out. Thanks for sharing.
Title: Re: Library Tree Discussion
Post by: ApacheReal on 2023-05-30 09:22:32
I opened a thread in General (fb2k) Topic: Stream Data Radio

I report it here while waiting for an answer because it concerns the file
advanced_radio_stream_parser

Thanks
Title: Re: Library Tree Discussion
Post by: Montchenot on 2023-05-31 17:06:01
Hi WilB, what's your perspective of a 64 bits JavaScript container for your Library Tree package?
Title: Re: Library Tree Discussion
Post by: ApacheReal on 2023-05-31 21:45:12
I installed a few too many panels:

Error: Spider Monkey Panel v1.6.1 ({4CFD4EB2-C344-4DC5-9598-D8408275F02F}: Library Tree v2.4.0 by WilB)
Out of memory: 11889292/1073741824 bytes

 :))
Title: Re: Library Tree Discussion
Post by: ApacheReal on 2023-06-01 08:23:33
I understand that there is a limit to the number of library panels you can manage.

With 33 libray panel I have crashes when I create album art icons.

I arrived to install a maximum of 57 libray panels with immediate crash.

With 45 libray panels, the crash occurred on the first viewing of album art.

With 33 library panels. it seemed to work but after a selection between one panel and another it crashed.

I'm currently in testing with 21 libary panels to see if it holds up.

I understand that my configuration is abnormal.

Report it anyway.
Title: Re: Library Tree Discussion
Post by: twikaros on 2023-06-03 15:26:44
Hello everyone, I have this problem when select: View by Folder Structure. It adds a row of numbers. See the screenshot.

https://ibb.co/sFKRH9N

(https://ibb.co/sFKRH9N)

- Foobar v2.0 (x86)
- SMP 1.6.1 mod
- Library-Tree-v2.4.0
Title: Re: Library Tree Discussion
Post by: WilB on 2023-06-05 16:20:29
@Montchenot
Quote
what's your perspective of a 64 bits JavaScript container for your Library Tree package?
When there is a 64 bit version of Spider Monkey Panel, library tree will be 64 bit compatible. There has been significant development of Spider Monkey Panel recently, e.g.
https://github.com/TheQwertiest/foo_spider_monkey_panel/issues/213 (https://github.com/TheQwertiest/foo_spider_monkey_panel/issues/213)
https://github.com/TheQwertiest/foo_spider_monkey_panel/commits/feature/v2 (https://github.com/TheQwertiest/foo_spider_monkey_panel/commits/feature/v2)

So there is cause for cautious optimism...


@ApacheReal
By default, Spider Monkey Panel limits it's memory use to I believe 1GB for ALL Spider Monkey Panel scripts in the layout. Loading the library into library tree requires a certain amount of memory for each panel depending on how big the library is and images displayed. So it's not surprising there is a memory issue with 33+ panels.

If you really want that number of panels, you can try increasing the memory available to Spider Monkey Panel in advanced > spider monkey panel > performance > GC > maximum heap size, subject to the amount of memory installed on your system.


@twikaros
They're internal delimiters library tree uses to process $colour{} functions, to colour parts of a line etc differently.

However, view by folder structure is a hard coded foobar2000 pattern that isn't user editable. So it should never contain such colour codes.

So I'm perplexed as to how it happens.

I tried toggling to and from view by folder structure and a view that uses the colour codes, and it all behaved.

You could try clearing panel properties (backup first if you've made changes you want to keep). If the issue persists, please try and post exact steps to reproduce including any patterns etc. Alternatively, you could: 1) export panel properties from a problematical instance of library tree; 2) import the panel properties into a new library tree panel to confirm that the issue is still present; 3) then if the issue is still present, post the panel properties and I'll take a look.
Title: Re: Library Tree Discussion
Post by: Montchenot on 2023-06-05 17:46:51
Thanks, WilB 👍
Title: Re: Library Tree Discussion
Post by: twikaros on 2023-06-06 10:41:54
@WilB‍ Thanks for your reaction

Quote
You could try clearing panel properties (backup first if you've made changes you want to keep). If the issue persists, please try and post exact steps to reproduce including any patterns etc. Alternatively, you could: 1) export panel properties from a problematical instance of library tree; 2) import the panel properties into a new library tree panel to confirm that the issue is still present; 3) then if the issue is still present, post the panel properties and I'll take a look.


Properties attached.

Thanks in advance for all the effort!
Title: Re: Library Tree Discussion
Post by: ApacheReal on 2023-06-06 14:26:48
I have a requirement being a radio enthusiast.

With the Library Tree in Source Playlist I can add one Playlist only.

Going into Options I added the Pattern %filename% in Views

In doing so I created a sort of tree view for each radio channel.

Now I come to the question.

Is it possible to add multiple playlists managed by a single spider monkey panel module?

The display must respect the radio group per folder:

Folder Radio Group 1

Folder Radio Group 2

etc...

At the moment the only solution is to create a radio group playlist for each spider monkey:

(https://i.postimg.cc/3Wv0bcg2/Screenshot-2023-06-06-152446.png) (https://postimg.cc/3Wv0bcg2)
Title: Re: Library Tree Discussion
Post by: WilB on 2023-06-06 18:14:43
@twikaros
The issue is related to options > custom tab > counts & statistics : custom colour enabled.

If you disable that the issue should disappear.

Alternatively, if you don't want to wait for the next version, you can do a minor edit to the code to fix the issue properly and retain the custom colour:

in panel.js;

change line 331 from:
}
to:
Code: [Select]
} else if (ui.col.counts) this.colMarker = true;
This line is immediately above:
this.pn_h_auto = ppt.pn_h_auto && ppt.rootNode;


@ApacheReal
OK, if I've understood you correctly...

As a quick test, if you don't mind editing a little code, to see if it's of any use, in populate.js, comment out line 2078 and insert the following in that position:
Code: [Select]
plman.ActivePlaylist = plman.FindOrCreatePlaylist([...new Set(names)].join('; '), true);

Open menu.js. and search for 'Send to new playlist'. Change it to, e.g. 'Send to named playlist'

Then right click item in library tree and choose 'Send to named playlist'
The first time an item is clicked a playlist should be generated with a name based on the item clicked.
Next time the same item is right clicked and 'Send to named playlist' chosen, the playlist should be re-used.
I don't think it will be possible to change the auto-generated name.

If it's useful, then an option to use that method could be added.
Title: Re: Library Tree Discussion
Post by: twikaros on 2023-06-06 18:53:21
@WilBThat worked! Thank you so much!

Quote
The issue is related to options > custom tab > counts & statistics : custom colour enabled.

If you disable that the issue should disappear.

Alternatively, if you don't want to wait for the next version, you can do a minor edit to the code to fix the issue properly and retain the custom colour ...
Title: Re: Library Tree Discussion
Post by: ApacheReal on 2023-06-06 20:43:17

OK, if I've understood you correctly...

As a quick test, if you don't mind editing a little code, to see if it's of any use, in populate.js, comment out line 2078 and insert the following in that position:
Code: [Select]
plman.ActivePlaylist = plman.FindOrCreatePlaylist([...new Set(names)].join('; '), true);

Open menu.js. and search for 'Send to new playlist'. Change it to, e.g. 'Send to named playlist'

Then right click item in library tree and choose 'Send to named playlist'
The first time an item is clicked a playlist should be generated with a name based on the item clicked.
Next time the same item is right clicked and 'Send to named playlist' chosen, the playlist should be re-used.
I don't think it will be possible to change the auto-generated name.

If it's useful, then an option to use that method could be added.

It does not work.

Or generate 2 different playlists for %filename%
or, for folder, always overwrites the same folder called "All 1 Folder Structure"
Title: Re: Library Tree Discussion
Post by: Defender on 2023-06-07 22:51:38
Hi,

I decided to use LibTree in my skin which is really awesome :-)

Two questions:

1) How do I change the background color upon selecting an input text? I tried all (blue) options-custom but non had any effect. (see text selection.jpg)

2) I like transparancy because that gives me control over what is painted in the background. Easy enough to set the spider_monkey panel to transparant. But if you also want to set the topbar/filterbox to transparant I have to change the alpha of options-custom-background to x,x,x,0 which works. Problem is that in that case also images that are scrolling outside the panel are shown in the background on top of what I paint. Can you suppress that? (see transparant.jpg)
BTW, This is not an issue in folder view. That's completely fine

In both case I hightlighted the issues in red.

Thx
Title: Re: Library Tree Discussion
Post by: Defender on 2023-06-08 00:49:45
I understand that there is a limit to the number of library panels you can manage.

With 33 libray panel I have crashes when I create album art icons.

I arrived to install a maximum of 57 libray panels with immediate crash.

With 45 libray panels, the crash occurred on the first viewing of album art.

With 33 library panels. it seemed to work but after a selection between one panel and another it crashed.

I'm currently in testing with 21 libary panels to see if it holds up.

I understand that my configuration is abnormal.

Report it anyway.

I currently run 80 panels in my skin (based on original DarkOne; slowly migrating WSH and JS2 stuff to JS3) and intend to "copy" some ten panels more. I sometimes have the same issue you experience (first panels that crash are WSH/JS2). What helps in my case is just move one of the main PSS panels (with all of the underlying panels down (or up :-) ). Then save FCL again. Works for me ;-). FCL is some 1400KB and includes both Georgia and ReBorn.
Title: Re: Library Tree Discussion
Post by: ApacheReal on 2023-06-08 06:15:57
I understand that there is a limit to the number of library panels you can manage.

With 33 libray panel I have crashes when I create album art icons.

I arrived to install a maximum of 57 libray panels with immediate crash.

With 45 libray panels, the crash occurred on the first viewing of album art.

With 33 library panels. it seemed to work but after a selection between one panel and another it crashed.

I'm currently in testing with 21 libary panels to see if it holds up.

I understand that my configuration is abnormal.

Report it anyway.

I currently run 80 panels in my skin (based on original DarkOne; slowly migrating WSH and JS2 stuff to JS3) and intend to "copy" some ten panels more. I sometimes have the same issue you experience (first panels that crash are WSH/JS2). What helps in my case is just move one of the main PSS panels (with all of the underlying panels down (or up :-) ). Then save FCL again. Works for me ;-). FCL is some 1400KB and includes both Georgia and ReBorn.

HI. Thanks, I'll do some tests.

OT:
Your modified skin is interesting, I would like to make some changes that I see in the photo and that I would like to adapt to my skin, such as adding flags, the record label and more. Can it be downloaded somewhere?

Title: Re: Library Tree Discussion
Post by: Defender on 2023-06-08 12:46:26
OT:
Your modified skin is interesting, I would like to make some changes that I see in the photo and that I would like to adapt to my skin, such as adding flags, the record label and more. Can it be downloaded somewhere?

OT 2: I knicked the idea from Georgia. The basis of artist logo's/flags and recordlabel is Georgia's. Then I started downloading/making my own logo's and flags. As you can probably see my skin is based on the original DarkOne. Not MOD2, I did not like the look of it. Took me a lot of time to get it scale independent since the skin also has to run and look good on 150%, 250% and 300% scaling.
I'll send you a private message ...
Title: Re: Library Tree Discussion
Post by: twikaros on 2023-06-08 12:55:14
OT:
Your modified skin is interesting, I would like to make some changes that I see in the photo and that I would like to adapt to my skin, such as adding flags, the record label and more. Can it be downloaded somewhere?

OT 2: I knicked the idea from Georgia. The basis of artist logo's/flags and recordlabel is Georgia's. Then I started downloading/making my own logo's and flags. As you can probably see my skin is based on the original DarkOne. Not MOD2, I did not like the look of it. Took me a lot of time to get it scale independent since the skin also has to run and look good on 150%, 250% and 300% scaling.
I'll send you a private message ...
I don't want to be rude, but could I also receive that private message? I admire your theme very much!

Title: Re: Library Tree Discussion
Post by: WilB on 2023-06-09 00:16:00
@Defender

1) Search text: selected background colour

If pseudo transparency is enabled the background colour seemed irrelevant and so is hard coded blue RGB(0, 153, 255)

If you want to change it now, you can alter a little code, comment out window.IsTransparent in ~line 686 of interface.js (I'll likely make the change for the next version):

Code: [Select]
this.col.searchSel = /*window.IsTransparent ||*/ !this.col.bgSel ? 0xff0099ff : this.getContrast(this.col.search, this.col.bgSel) > 3 ? this.col.bgSel : this.getBlend(this.col.search, this.col.bg == 0 || this.img.blurDark ? 0xff000000 : this.col.bg, 0.25);

It should then use the background selected colour (CUI or custom), unless there's insufficient contrast with search text, when a blend of search text colour and background is used.

2)  Scrolling

Quote
This is not an issue in folder view.
That's because drawing the text is much more straightforward. In the text selection pic there is image + text + there could also be text overlayed on top of the thumbnails etc. That makes the handling much more complicated, especially with smooth scroll enabled. To deal with this, for image backgrounds generated internally by library tree such as blur backgrounds or those generated by single panel SMP themes like Georgia Reborn, library tree seamlessly overlays a segment of the image background to hide the scroll items. In your case an external image is being used which library tree has no access to. There used to be a window.GetBackgroundImage() method which would have overcome this, but that was removed pre-SMP.

Consequently, in pseudotransparent mode the default is to use a solid overlay. You can choose the colour. Alternatively, the top bar can be hidden and in layout metrics the margin override top/bottom (no top bar) set to 0. These are in the display tab.

It is possible to make a few changes to the code so that when scroll has ended, no unwanted scroll items are in the top bar. But during scrolling, with smooth scrolling enabled, without an overlay they will pass through the top bar. Smooth scrolling can be switched, to stop that, but IMO that's inferior for images. If you want to try I can pm you code changes.

Another possibility might be to somehow or other get the background image to library tree.
Title: Re: Library Tree Discussion
Post by: always.beta on 2023-06-10 03:25:45
Panel Settings > Album Art > Reset page, popup error
Title: Re: Library Tree Discussion
Post by: ApacheReal on 2023-06-11 19:02:44
I get this error after adding a hd with many files.

Error: Spider Monkey Panel v1.6.1 ({4CFD4EB2-C344-4DC5-9598-D8408275F02F}: Library Tree v2.4.0 by WilB)
Script aborted by user

File: library.js
Line: 127, Column: 28
Stack trace:
  added@library.js:127:28
  updateLibrary@library.js:1059:32
  treeState@library.js:1047:15
  on_library_items_added@callbacks.js:88:6

Following

Error: Spider Monkey Panel v1.6.1 ({4CFD4EB2-C344-4DC5-9598-D8408275F02F}: Library Tree v2.4.0 by WilB)
out of memory
Title: Re: Library Tree Discussion
Post by: ApacheReal on 2023-06-13 11:15:44
Another error report:

Error: Spider Monkey Panel v1.6.1 (Biography: Biography v1.4.1 by WilB)
f is null

File: text.js
Line: 1362, Column: 23
Stack trace:
  getItemProperties/<@text.js:1362:23
  getItemProperties@text.js:1315:8
  txtReader@text.js:2374:42
  getText@text.js:1581:28
  on_size@text.js:2134:8
  on_size@callbacks.js:554:6
Title: Re: Library Tree Discussion
Post by: Defender on 2023-06-13 17:38:23
1) Search text: selected background colour
code change

2)  Scrolling
transparant top bar

Hi WilB,

1) The code change did the trick. I don't know how I can alter the chosen background for selected text, but it is a lot better now.
May I suggest that it will be an option under options  - custom in the upcoming release?

2) Sounds complicated :-)
It's not an option for me to hide the topbar. I need it to quickly find stuff I want to play.
For now I just choose a opaque colour that is similar to the rest of the top parts of the other panels.

I normally start with painting a gradient in the available area per panel (restricted by a dark bezel, accent colour and selectable hor/ver padding) and than display art based on the current playing artist/title selectable by a textbutton. Choices are OFF, artistpic (customizable per artist and/or artist/track), two different artistlogo's, artistcountryflag, recordlabel, cover (embedded preferred). Sounds complicated to communicate that to LibTree.
So for now I think I'll just stick to 29,45,58 no transparancy for the topbar.

Thx for the workaround!

Question: How is the horizontal size of the topbar calculated (cannot find it in options)? I would like to have it the same height as the topbar above my ELP/ESP. I'm using 22 pixels x windowsScaling. So either I adjust your topbar height or I adjust mine.
Title: Re: Library Tree Discussion
Post by: Mrakobes on 2023-06-14 07:58:37
Just started using it yesterday, a delightful panel.

There is a problem

1. displaying the number of tracks as follows - if there is a cue and an image in the folder, then plus one is displayed, not an example: 10 tracks in the cue then 11 are displayed

2. how to display in the right column with a file structure not only the number of tracks in the folder but the

number of artists  •  the number of albums  •  the number of tracks

Title: Re: Library Tree Discussion
Post by: ApacheReal on 2023-06-14 13:39:30
Error: Spider Monkey Panel v1.6.1 ({4CFD4EB2-C344-4DC5-9598-D8408275F02F}: Library Tree v2.4.0 by WilB)
Clone failed:
allocation size overflow

File: library.js
Line: 1055, Column: 30
Stack trace:
  updateLibrary@library.js:1055:30
  treeState@library.js:1047:15
  on_library_items_added@callbacks.js:88:6
Title: Re: Library Tree Discussion
Post by: Mrakobes on 2023-06-15 12:21:24
how do I configure the script to display the artist and track?

Nowplaying Artist - artist IS $nowplaying{$meta(artist,0)}

where to insert the title
Title: Re: Library Tree Discussion
Post by: Mrakobes on 2023-07-01 06:31:07
And how to remove case sensitivity??? Does not find the name if The or the
Title: Re: Library Tree Discussion
Post by: Mrakobes on 2023-07-08 09:35:19
When you right-click to send the selected to a new playlist, a library view tab is created on the right, although this is disabled
Title: Re: Library Tree Discussion
Post by: Majestyk on 2023-07-17 00:37:12
With Library Tree added to Darkone, I've noticed the image thumbnails disappear and reload when you change the View. (IE: Darkone's View buttons). Is there a way to mod it so it won't do this? This doesn't happen with various Playlists.
Title: Re: Library Tree Discussion
Post by: Majestyk on 2023-07-17 03:46:43
I added an extra panel.treePaint() in images.js and now the cover thumbnails load twice as fast. It starts at line 137.
Code: [Select]
    async load_image_async(key, image_path, ix, rawCache) {
const image = Date.now() - this.asyncBypass > 5000 ? await gdi.LoadImageAsyncV2(0, image_path) : gdi.Image(image_path);
const o = this.cache[key];
if (o && o.img == 'called') !rawCache ? this.cacheIt(image, key, ix) : this.cacheItPreLoad(image, key, ix);
panel.treePaint();
}

Title: Re: Library Tree Discussion
Post by: ApacheReal on 2023-07-24 14:11:47
For the next update please fix the following error:

Error: Spider Monkey Panel v1.6.1 (Biography: Biography v1.4.1 by WilB)
f is null

File: text.js
Line: 1362, Column: 23
Stack trace:
  getItemProperties/<@text.js:1362:23
  getItemProperties@text.js:1315:8
  txtReader@text.js:2374:42
  getText@text.js:1581:28
  on_size@text.js:2134:8
  on_size@callbacks.js:554:6

This error occurs when closing on a radio in playlist and then reopening the foobar skin.

Arghhhhhhhhhhhh, post in thread correct Byography.
Title: Re: Library Tree Discussion
Post by: Majestyk on 2023-08-21 07:40:11
Does anyone else have this issue? When changing a mode in Quick Setup, the arrow keys stop working. Refresh/Reloading doesn't fix it. Only exiting my theme or clearing the properties will make it work again...Until Quick Setup is used.
Title: Re: Library Tree Discussion
Post by: Majestyk on 2023-08-22 05:33:31
I figured out the issue. It had to do with me changing the path and using Spider Monkey's "Memory" instead of "Package Manager".

For some reason, leaving out a window.DefineScript (maybe because of the Drag and Drop??) causes the Library to lose all keyboard functions (not just arrows) when changing Quick Setup. I have no clue how that happens and I'm amazed I figured it out.  :)
Title: Re: Library Tree Discussion
Post by: Mrakobes on 2023-08-22 17:32:24
and when you send the track numbering from the panel to the current playlist using the enter key, this is not observed during a simple drag-and-drop with the mouse.
Title: Re: Library Tree Discussion
Post by: JohnnyFire on 2023-08-28 15:21:33
Hi,

I decided to use LibTree in my skin which is really awesome :-)

Two questions:

1) How do I change the background color upon selecting an input text? I tried all (blue) options-custom but non had any effect. (see text selection.jpg)

2) I like transparancy because that gives me control over what is painted in the background. Easy enough to set the spider_monkey panel to transparant. But if you also want to set the topbar/filterbox to transparant I have to change the alpha of options-custom-background to x,x,x,0 which works. Problem is that in that case also images that are scrolling outside the panel are shown in the background on top of what I paint. Can you suppress that? (see transparant.jpg)
BTW, This is not an issue in folder view. That's completely fine

In both case I hightlighted the issues in red.

Thx


Holy WOWWWW what a skin my friend labels arists logo and everything! im speachless!!!!!!!!!!!
Title: Re: Library Tree Discussion
Post by: Montchenot on 2023-08-29 18:56:31
Is there a way to update the thumbnail of an album in the grid?
(It gets updated if I change the size of the grid but reverts to the old image when restoring the size)
(I guess, something like Reload Tags from File would do)
Title: Re: Library Tree Discussion
Post by: aum on 2023-09-12 14:37:27
Hi! I am using 3 panels: 1st SMP in "library" mode and 2 SMP panels in "panel" mode. When using "folder structure view" in the 1st panel (library), the Cue filter does not work properly in the other panels (view by artist, album etc.). I get duplicate .flac and .cue in the library tree (in artist and album panels) (.CUE and .FLAC, .WV, WAV or APE)
If I press shift+windows key and Reload on the 2nd or 3rd panel, they reload with normal sorting (no duplicates).
How can this be fixed (maybe add an additional reload command in the script when Source=Library & Single-click=Select?)?
Spoiler (click to show/hide)
Title: Re: Library Tree Discussion
Post by: Gabohar on 2023-10-14 05:29:11
@WilB It would be nice if in a future release in the "Folder Structure" view there is a chance to hide the root folder and only shows the subfolders and the nowplaying highlight folder (album for example) shows opened or selected. All this thinking in a 3 columns panel configuration, like my actual layout (https://hydrogenaud.io/index.php/topic,58574.msg1034016.html#msg1034016):

First: Artist (Covers with labels right)
Second: Studio, Compilations and Lives albums (Folder Structure with Ultra-Modern View)
Third: Subfolders albums (Covers labels bottom)
Title: Re: Library Tree Discussion
Post by: Gabohar on 2023-10-14 05:35:32
Hi! I am using 3 panels: 1st SMP in "library" mode and 2 SMP panels in "panel" mode. When using "folder structure view" in the 1st panel (library), the Cue filter does not work properly in the other panels (view by artist, album etc.). I get duplicate .flac and .cue in the library tree (in artist and album panels) (.CUE and .FLAC, .WV, WAV or APE)
If I press shift+windows key and Reload on the 2nd or 3rd panel, they reload with normal sorting (no duplicates).
How can this be fixed (maybe add an additional reload command in the script when Source=Library & Single-click=Select?)?
Spoiler (click to show/hide)

Happens the same to me with .CUE of FLAC or APE files, shows duplicated. I use the component "Cue Fixer (https://github.com/RevenantX/foo_cuefixer)", so in the playlists the albums shows correctly.
Title: Re: Library Tree Discussion
Post by: madhale on 2023-10-23 07:29:24
I'm having this weird issue. Whenever I go to the options, I just get a white screen with some menu items... and I can't click anything other than X to close the window. I'm on Foobar 2.0 x86, Spider Monkey Panel 1.6.1, and Library-Tree-v2.4.0. Is there something obvious that I've done incorrectly? Any ideas? (also, is there a setting to remove the "all music" item I circled?)
(https://i.imgur.com/yh2PFyZ.jpg)
Title: Re: Library Tree Discussion
Post by: Majestyk on 2023-10-23 08:58:41
I'm having this weird issue. Whenever I go to the options, I just get a white screen with some menu items... and I can't click anything other than X to close the window. I'm on Foobar 2.0 x86, Spider Monkey Panel 1.6.1, and Library-Tree-v2.4.0. Is there something obvious that I've done incorrectly? Any ideas? (also, is there a setting to remove the "all music" item I circled?)

You're missing files or the path is messed up. Find the folder where your libarary files are stored. There should be a folder called assets. In that folder are three other folders. html, images and licenses. If you can't find it, do a search for "Collage.png", which is one of the many files found in images.
Title: Re: Library Tree Discussion
Post by: madhale on 2023-10-23 10:16:12
Thanks for the help. It looks like everything is in the right place. I have a portable installation, so I'm not sure if that matters... anyway, I tried on another PC and again on this one with another portable installation. When I click on the package then click to open package folder, I'm taken to a folder with the assets folder in it... and there are 3 folders in that folder.
(https://i.imgur.com/I15TEOf.png)

I tried opening the html file and I can mess with it in firefox a bit.

When I go back to click options, I just get this again:
(https://i.imgur.com/VBAsRtn.png)
Title: Re: Library Tree Discussion
Post by: Air KEN on 2023-10-23 12:03:57
foobar2000\profile\foo_spider_monkey_panel\packages\{E85C9EF0-778B-46DD-AF20-F4BE831360DD}\assets\html
foobar2000\foo_spider_monkey_pane\packages folder < delete

Spider Monkey Panel > right click > Configure panel... > Package > Import > Library-Tree-v2.4.0.zip
Title: Re: Library Tree Discussion
Post by: Majestyk on 2023-10-23 23:28:47
Weird. I have several portable theme installs with WilB's Library and I've never had this issue.

As Air KEN has mentioned, make sure you import the zip file.
Title: Re: Library Tree Discussion
Post by: IP974 on 2023-12-23 07:21:19
Hello, can someone help me to have Mode two panels with alphabetical index and covers. Thanks ;)
(https://user-images.githubusercontent.com/35600752/156163852-5d8295f4-3ff2-4ef4-849f-0bd5ce24ba8e.png)
Title: Re: Library Tree Discussion
Post by: Just_Addict on 2024-01-05 17:28:50

@WilB
‍ Small request, but seems you forgot to update the Download thread (https://hydrogenaud.io/index.php/topic,110938.90.html)?

Initially I came here because 2.2.0 kept crashing on right-clicks. Then I spotted the mention of a 2.4.0, but the other topic only goes up to 2.2.0.  Took a fair bit of time to discover there's an associated github a couple of pages back where you mentioned the new release..

Luckily the crash issue is solved with 2.4.0 but I can imagine someone less inclined to page through this thread and unaware of the github, would have had problems finding the last release.

Edit: Crap! This post editor makes a right mess of things, seems the forum software hasn't been updated since the last time I was here (which was a looooong time ago)
Title: Re: Library Tree Discussion
Post by: Just_Addict on 2024-01-07 09:07:28
Sigh... and of course can't delete posts...

This always happens... spending hours to get something working and running into an issue... post it... and it starts working on the last attempt.
Title: Re: Library Tree Discussion
Post by: Mrakobes on 2024-01-11 10:42:39
Hello, can someone help me to have Mode two panels with alphabetical index and covers. Thanks ;)

And I made an option with artists in circles, set up the display of covers, but I still did not understand how to register the path to the artist's image (I have an image in the artist's root folder), I am also not sure what is convenient that pulls the artist tag from all folders, it is not yet clear how to remove the strip between two panels
Title: Re: Library Tree Discussion
Post by: always.beta on 2024-02-17 12:25:39
 I have two albums, their album name, album artist and other information are exactly the same, only the date information is different, for example, one is 2007-08-02, the other is 2007-08-02T08:00:00Z . The location of the two albums is different.
 I use DUI+ default playlist, default playlist grouping is based on [By artis/date/album].
 In LT, search album name, and then click Send to playlist, the results are inconsistent with the main menu-Edit-Sort-by Path results, how should I set it?
 LT is viewed by album artist, and I entered %path_sort% or $directory(%path%) in LT's settings to no avail.
 Sometimes the result is the first picture, sometimes the result is the second picture, and the expected result is the third picture.
Title: Re: Library Tree Discussion
Post by: anamorphic on 2024-02-17 13:47:13
^ I've noticed after changing the Options > Behavior tab > Playlist Sort Order box, that you have to reload the panel for changes to take effect correctly.

If that does not work...

Are track filenames starting with %discnumber%.%tracknumber% ? (for %path_sort% to sort correctly)

What happens if you put a custom sort order in that box, like -

Code: [Select]
%album artist%|%date%|%album%|%discnumber%|%tracknumber%|%title%
Title: Re: Library Tree Discussion
Post by: always.beta on 2024-02-17 14:25:47
that you have to reload the panel for changes to take effect correctly.
I filled in [ %path_sort%] and restarted fb2k to take effect.Or as you say, reloaded panels can work.
For this sort, click OK in the settings panel does not take effect immediately, Wilb, is there any way to improve?
Title: Re: Library Tree Discussion
Post by: aum on 2024-02-28 11:50:18
Happens the same to me with .CUE of FLAC or APE files, shows duplicated. I use the component "Cue Fixer (https://github.com/RevenantX/foo_cuefixer)", so in the playlists the albums shows correctly.
Cue Fixer don't work with library :(  (only with playlist view).  Any ideas on how to find a way out?
X
I will try add additional command to callbacks.js:
function on_playlist_items_added(playlistIndex) {
.........
window.Reload();}
.
 It works, but the panels refresh 2 times and blinks. Maybe someone has some better ideas?
Title: Re: Library Tree Discussion
Post by: marc2k3 on 2024-02-28 12:01:19
Not an easy task but if you were prepared to rename your files something like...

blah.cue
blah.cue.flac

You could prevent *.cue.flac from being indexed at File>Preferences>Media Library>File types>Exclude.

edit: references inside cue files would obviously need updating. What fun.
Title: Re: Library Tree Discussion
Post by: aum on 2024-02-28 12:14:45
Not an easy task but if you were prepared to rename your files..
I don't want to rename, because all files are seeding in "transmission")
Maybe I can add additional update command in the right place in the code?
Title: Re: Library Tree Discussion
Post by: aum on 2024-03-26 12:16:02
Quote
Maybe I can add additional update command in the right place in the code?
I found a solution!
1. I made a clone of the original package.
2. I added to populate.js in the section
load(list, isArray, add, autoPlay, def_pl, insert) {....}
creating an additional playlist with name "Library folder cache"
Code: [Select]
load(list, isArray, add, autoPlay, def_pl, insert) {
let np_item = -1;
let pid = -1;
const pl_stnd = ppt.libPlaylist.replace(/%view_name%/i, panel.viewName);
let pl_stnd_idx = plman.FindOrCreatePlaylist(pl_stnd, true);
        let cache_2nd_pl = plman.FindOrCreatePlaylist("Library folder cache", true);//my solution

if (!def_pl && plman.ActivePlaylist != -1) pl_stnd_idx = plman.ActivePlaylist;
else if (ppt.activateOnChange) plman.ActivePlaylist = pl_stnd_idx;


if (autoPlay == 4 && plman.PlaylistItemCount(pl_stnd_idx) || autoPlay == 3 && fb.IsPlaying) {
autoPlay = false;
add = true;
}
const items = isArray ? this.getHandleList() : list.Clone();

this.sortIfNeeded(items);
this.selList = items.Clone();
this.selection_holder.SetSelection(this.selList);
const plnIsValid = pl_stnd_idx != -1 && pl_stnd_idx < plman.PlaylistCount;
const pllockRemoveOrAdd = plnIsValid ? plman.GetPlaylistLockedActions(pl_stnd_idx).includes('RemoveItems') || plman.GetPlaylistLockedActions(pl_stnd_idx).includes('ReplaceItems') || plman.GetPlaylistLockedActions(pl_stnd_idx).includes('AddItems') : false;
if (!add && pllockRemoveOrAdd) return;
if (fb.IsPlaying && !add) {
if (ppt.actionMode == 1) {
const pl_playing = `${ppt.libPlaylist} (playing)`;
const pl_playing_idx = plman.FindOrCreatePlaylist(pl_playing, false);
if (plman.PlayingPlaylist == pl_stnd_idx) {
plman.RenamePlaylist(pl_stnd_idx, pl_playing);
plman.RenamePlaylist(pl_playing_idx, pl_stnd);
plman.SetPlaylistSelection(pl_playing_idx, $.range(0, plman.PlaylistItemCount(pl_playing_idx) - 1), true);
plman.RemovePlaylistSelection(pl_playing_idx, false);
plman.InsertPlaylistItems(pl_playing_idx, 0, items, false);
plman.MovePlaylist(pl_playing_idx, pl_stnd_idx);
plman.MovePlaylist(pl_stnd_idx + 1, pl_playing_idx);
                    plman.SetPlaylistSelection(pl_stnd_idx, $.range(0, plman.PlaylistItemCount(pl_stnd_idx) - 1), true);//my solution
                    plman.RemovePlaylistSelection(pl_stnd_idx, false);//my solution
                    plman.InsertPlaylistItems(pl_stnd_idx, 0, items, false);//my solution
                    plman.ClearPlaylist(cache_2nd_pl);//my solution
        plman.InsertPlaylistItems(cache_2nd_pl, 0, items);//my solution
                   
} else {
plman.SetPlaylistSelection(pl_stnd_idx, $.range(0, plman.PlaylistItemCount(pl_stnd_idx) - 1), true);
                    plman.RemovePlaylistSelection(pl_stnd_idx, false);
                    plman.InsertPlaylistItems(pl_stnd_idx, 0, items, false);
                 plman.ClearPlaylist(cache_2nd_pl);//my solution
     plman.InsertPlaylistItems(cache_2nd_pl, 0, items);//my solution
                   
}

plman.ActivePlaylist = pl_stnd_idx;
            
} else if (fb.GetNowPlaying()) {
np_item = items.Find(fb.GetNowPlaying());
let pl_chk = true;
let np;
if (np_item != -1) {
np = plman.GetPlayingItemLocation();
if (np.IsValid) {
if (np.PlaylistIndex != pl_stnd_idx) pl_chk = false;
else pid = np.PlaylistItemIndex;
}
if (pl_chk && pid == -1 && items.Count < 5000) {
if (ui.dui) plman.SetActivePlaylistContext();
const start = Date.now();
for (let i = 0; i < 20; i++) {
if (Date.now() - start > 300) break;
fb.RunMainMenuCommand('Edit/Undo');
np = plman.GetPlayingItemLocation();
if (np.IsValid) {
pid = np.PlaylistItemIndex;
if (pid != -1) break;
}
}
}
}
if (pid != -1) {
plman.ClearPlaylistSelection(pl_stnd_idx);
                    plman.ClearPlaylistSelection(cache_2nd_pl);//my solution
plman.SetPlaylistSelectionSingle(pl_stnd_idx, pid, true);
                    plman.SetPlaylistSelectionSingle(cache_2nd_pl, pid, true);//my solution
plman.RemovePlaylistSelection(pl_stnd_idx, true);
                    plman.RemovePlaylistSelection(cache_2nd_pl, true);//my solution
const it = items.Clone();
items.RemoveRange(np_item, items.Count);
it.RemoveRange(0, np_item + 1);
if (plman.PlaylistItemCount(pl_stnd_idx) < 5000) plman.UndoBackup(pl_stnd_idx);
plman.InsertPlaylistItems(pl_stnd_idx, 0, items);
                    plman.InsertPlaylistItems(cache_2nd_pl, 0, items);//my solution
plman.InsertPlaylistItems(pl_stnd_idx, plman.PlaylistItemCount(pl_stnd_idx), it);
                    plman.InsertPlaylistItems(cache_2nd_pl, plman.PlaylistItemCount(pl_stnd_idx), it);//my solution
                   
} else {
if (plman.PlaylistItemCount(pl_stnd_idx) < 5000) plman.UndoBackup(pl_stnd_idx);
plman.ClearPlaylist(pl_stnd_idx);
                    plman.ClearPlaylist(cache_2nd_pl);//my solution
plman.InsertPlaylistItems(pl_stnd_idx, 0, items);
plman.InsertPlaylistItems(cache_2nd_pl, 0, items);//my solution 
                 
}
}
} else if (!add) {
if (plman.PlaylistItemCount(pl_stnd_idx) < 5000) plman.UndoBackup(pl_stnd_idx);
plman.ClearPlaylist(pl_stnd_idx);
            plman.ClearPlaylist(cache_2nd_pl);//my solution
plman.InsertPlaylistItems(pl_stnd_idx, 0, items);
            plman.InsertPlaylistItems(cache_2nd_pl, 0, items);//my solution
plman.SetPlaylistFocusItem(pl_stnd_idx, 0);
//plman.SetPlaylistFocusItem(cache_2nd_pl, 0);//my solution

} else {
if (plman.PlaylistItemCount(pl_stnd_idx) < 5000) plman.UndoBackup(pl_stnd_idx);
plman.InsertPlaylistItems(pl_stnd_idx, !insert ? plman.PlaylistItemCount(pl_stnd_idx) : plman.GetPlaylistFocusItemIndex(pl_stnd_idx), items, true);
            plman.InsertPlaylistItems(cache_2nd_pl, !insert ? plman.PlaylistItemCount(pl_stnd_idx) : plman.GetPlaylistFocusItemIndex(pl_stnd_idx), items, true);//my solution
const f_ix = !insert || plman.GetPlaylistFocusItemIndex(pl_stnd_idx) == -1 ? plman.PlaylistItemCount(pl_stnd_idx) - items.Count : plman.GetPlaylistFocusItemIndex(pl_stnd_idx) - items.Count;
plman.SetPlaylistFocusItem(pl_stnd_idx, f_ix);
plman.EnsurePlaylistItemVisible(pl_stnd_idx, f_ix);

         
}
if (autoPlay) {
const c = (plman.PlaybackOrder == 3 || plman.PlaybackOrder == 4) ? Math.ceil(plman.PlaylistItemCount(pl_stnd_idx) * Math.random() - 1) : 0;
plman.ExecutePlaylistDefaultAction(pl_stnd_idx, c);
}
}
3. In the 1st panel I added a moded panel: source=library (view by folder structure), in behaviour tab set default playlist=Library artist cache (mode=browser).
4. In the 2nd panel - original panel: source=playlist "Library folder cache", in behaviour tab set default playlist="Library artist cache"  (mode=browser).
5. In the 3d panel - original panel: source=playlist "Library artist cache", in behaviour tab set default playlist="Library album cache"  (mode=browser).
Now Cue_fixer works fine with CUE & view by folder structure: clicking in the 1st panel creates 2 playlists: "Library folder cache" and Library artist cache. The 2nd panel is linked to the "Library folder cache" playlist. The 3rd panel is linked to the "Library artist cache" playlist. Clicking in the 3rd pane creates an independent "Library album cache" playlist.
X
P.s. Maybe the author will do a better job in the next update!
Title: Re: Library Tree Discussion
Post by: Montchenot on 2024-03-26 17:44:16
I would appreciate to be able to identify the current branch in a secondary node.

In my scenario, I tag tracks with the birth place and, sometimes, the background of people (with the three-letter-code for Regor's World-Map) as follows:

%composer-iso3166% ("SVN; Slovenia" for Hugo Wolf)
%composer-iso3166-b% ("AUT; Austria" for Hugo Wolf)
%lyricist-iso3166% ("BRA; Brasil" for Alfredo Le Pera)
%lyricist-iso3166-b% ("ARG; Argentina" for Alfredo Le Pera)
%artist-iso3166% ("USA; United States of America" for Cathy Berberian)
%artist-iso3166-b% ("ARM; Armenia" for Cathy Berberian)
%group-iso3166% ("FRA; France" for Orange Blossom)
%group-iso3166-b% ("EGY; Egypt" for Orange Blossom)
%producer-iso3166% ("DZA; Algeria" for Hector Zazou)
%producer-iso3166-b% ("FRA; France" for Hector Zazou)

And I'm trying to set some branches:

Country
   Composers & Lyricists
   or
   Performers & Producers
      By their birthplace
      or
      By their background
         Name
            Album

but I'm loosing track of where I am in each step because tracks are indeed filtered including maybe a composer of the "right" country performed by an artist of a different one, so I'd need to know which is the right country to further filter tracks (so that these tracks get listed under the composer's name but the performer's name doesn't get highlighted as for the same nationality).

Spoiler (click to show/hide)

I've also tried to write all nodes at once, when parsing tracks in the topmost filter, but failed when going for successive criteria because all "¦" must be resolved before any "|", I guess:

%country%|'Composers & Lyricists'|'By their birthplace'|%composer%|%album%|%<track>%
¦
%country%|'Performers & Producers'|'By their birthplace'|%artist%|%album%|%<track>%

Thanks in advance!