Skip to main content


If you are using a Hotmail or Outlook email address, please change it now, as Microsoft is rejecting all email from our service outright.
Topic: Library Tree Discussion (Read 50605 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Library Tree Discussion

Reply #125
Did you forget to change it?

Re: Library Tree Discussion

Reply #126
@WilB First of all, thank you very much for your work.
I love your "Library Tree". New options work as expected.

Re: Library Tree Discussion

Reply #128

I can't reproduce that with the new version ( 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.

Re: Library Tree Discussion

Reply #129
Hi WilB I'm using version 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.

Re: Library Tree Discussion

Reply #130
@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 in multi-value branching expressions.

All users of Library Tree should ensure that the 'Chakra' script engine is used (requires IE9 or later) - select in the JScript panel 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.

Re: Library Tree Discussion

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

Re: Library Tree Discussion

Reply #132
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%])

Re: Library Tree Discussion

Reply #133
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.

Re: Library Tree Discussion

Reply #134
Sounds like a great idea. Could I use this to display in descending date order ie latest album first?

Re: Library Tree Discussion

Reply #135
Yes. It all seems to be working on my copy & should be in the next release.

Re: Library Tree Discussion

Reply #136
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.

Re: Library Tree Discussion

Reply #137
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.

Re: Library Tree Discussion

Reply #138
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]
If I check Forced Layout the panel is just blank.

I managed to record it with Fraps and uploaded the video to YouTube: . 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: 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>

Re: Library Tree Discussion

Reply #139
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.


Re: Library Tree Discussion

Reply #140
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 :)

Re: Library Tree Discussion

Reply #141
New Version: Library Tree 1.4


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.

Re: Library Tree Discussion

Reply #142
New Version: Library Tree 1.401

FIX: Regression: selection issue

Re: Library Tree Discussion

Reply #143
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?

Re: Library Tree Discussion

Reply #144
Does "$meta(genre,0)" IS Test work?

Re: Library Tree Discussion

Reply #145
Hi jazzthieve
Yes, the addition of speech marks fixed it. Thanks or your swift reply.

Re: Library Tree Discussion

Reply #146
New Version: Library Tree 1.4.02

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.

CHG: Optimisations: draw + sub-item counts handling.
CHG: Updated to use new "Query Syntax Help" path in foobar2000.

Re: Library Tree Discussion

Reply #147
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.

Re: Library Tree Discussion

Reply #148
And thank you for adding those hotkeys. They work like a charm.
I'm really running out of complaints  ;)

Re: Library Tree Discussion

Reply #149
@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:
There's only one match in the middle of line 347.

SimplePortal 1.0.0 RC1 © 2008-2020