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

Re: Library Tree Discussion

Reply #200
Thanks a lot for this!

Re: Library Tree Discussion

Reply #201
New Version: Library Tree 2.1.0

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

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

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


Re: Library Tree Discussion

Reply #202
This is perfect. Thank you!

Re: Library Tree Discussion

Reply #203
Hello WilB,
I still very much like your script, thanks for even further develiping this!
An issue I have with 2.1.0 is the following:
Up to 2.0.2 your script showed the full 'pattern tree' (as defined in Panel Properties/pattern such as artist/album/title) with the foreground colour defined in Preferences/Display/Columns UI/Colours and fonts/Colours for 'Foreground' at 'Inactive selected items' for the currently playing title, see first and second attachment.
I liked this feature very much, as it enabled that you can select an album and then flip though the titles with 'previous' and 'next', and still the currenty played title is indicated by the above defined foreground colour for the 'inactive selected items'.

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

Thanks, MojoBass

Re: Library Tree Discussion

Reply #204
Hello,

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

Also is there a hotkey for search via Library Tree or focus on its search bar?

Re: Library Tree Discussion

Reply #205
@MojoBass
I've reinstated ...Show > Nowplaying in Highlight for the next version.

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

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

1) Set Spider Monkey panel index number (1-10) for "search" by right click... > panel properties > "ADV.Hot Key..."
2) Go to foobar2000 preferences > keyboard shortcuts & assign that Spider Monkey panel index to a key or key combination.
3) Press key(s) to activate search. This activates search provided library tree has focus as that's needed for typing entries.


Re: Library Tree Discussion

Reply #207
I have forgotten how to add taps at the top of the panel. Can it be done in the panel properties menu?

Re: Library Tree Discussion

Reply #208
If you mean Touch Control see menu > … Options > Mode

Re: Library Tree Discussion

Reply #209
Hey WilB,

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

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

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

Thanks again.


Re: Library Tree Discussion

Reply #211
^ They are Tabs - part of foobar DUI. Just add Tabs to your layout using Layout Editing Mode and place Spider Monkey / JScript Panel inside one.

Re: Library Tree Discussion

Reply #212
^ They are Tabs - part of foobar DUI. Just add Tabs to your layout using Layout Editing Mode and place Spider Monkey / JScript Panel inside one.

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

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

Although I like that bugle call.

Re: Library Tree Discussion

Reply #213
New Version: Library Tree 2.1.1

CHG: Optimised Search Clear behaviour.
CHG: Reinstated option to highlight nowplaying (menu > ... options > show).

Re: Library Tree Discussion

Reply #214
Hi WilB,
thanks very much for nowplaying highlightning!

Re: Library Tree Discussion

Reply #215
For the past month I've gathered a couple of wishlist items (ordered by personal priority) that I felt I could use the most. I know it's a long list and a lot to ask for, but I hope that at least some of these make sense to you and you'll consider implementing them at some point.

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



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

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

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

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



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

PS
Another minor thing, there's "_Custom.Colour Frame Highlight" option but no "_Custom.Colour Frame Selected" and because of that I can't blend the selected item's frame with the bg.

Re: Library Tree Discussion

Reply #216
1. Formatting. I couldn't find any tree or filter examples that offer the ability to set different colours for parts of a line, nor any case uses of your $rgb call??? The only sort of exception was facets which auto-dims text in parentheses or square brackets. There's also the highlight dim syntax (currently in DUI playlist) but I don't believe there is direct support for that in spider monkey panel.

It's actually quite complex to set different colours for different parts of a line of text. This plus the extra handling needed in various places, so all scenarios etc work, would increase the overhead. This post about sums it up.

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

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

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

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

4. Keystrokes. From the spider monkey panel documentation:

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

So essentially I can't do anything about this.

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

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

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

If you're inclined you may consider requesting items 1, 2 & 4 in the spider monkey panel thread.

Re: Library Tree Discussion

Reply #217
1. I'll take a look whether fb2k API provides any such functionality.

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

4. This comment means exactly what it says: SMP component does not receive a key event if it was handled by fb2k ('space' key down event in this case). So I can't pass to script (or suppress) what I don't have. You'll have to disable global 'space' shortcut if you want to use it in the scripts.
[EDIT] 4. Another alternative would be to use a popup to pass a string for searching.

Re: Library Tree Discussion

Reply #218
1.
Quote from: WilB
case uses of your $rgb call
Here's what I meant:

It all boils down to aesthetic choices, but for me it makes a huge difference in readability. Another case use would be 'releases' branch under 'album artist' - I could dim a little everything that has %release type% as single, ep etc., so that full length albums would stand out by being a bit brighter.

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

Absolutely nothing about any CUI elements or SMP has ever been noticeably slow for me, no matter what I do (...unless I make calls to foo_customdb, but it's an old and slow extension in itself).

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

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

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

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

6.
Thanks for this one!


Re: Library Tree Discussion

Reply #220
@Awesomeo

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

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

These should be in the next version (exact syntax of $colour might change), provided nothing unexpected arises during further testing etc.

 

Re: Library Tree Discussion

Reply #221
That's so great, thank you! This panel is heaven sent.

 
SimplePortal 1.0.0 RC1 © 2008-2019