Hydrogenaudio Forums

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: WilB on 2016-01-21 18:38:59

Title: 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 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: 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: 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: 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: 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: 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: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: 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: 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: 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: 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: 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: 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...
SimplePortal 1.0.0 RC1 © 2008-2018