Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Library Tree Discussion (Read 126541 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Library Tree Discussion

Reply #150
Updated to Foobar1.4b3 , JScript Panel v2.01 and Library Tree 1.3.9.2 runs Beautifully seems to load a bit quicker. {This is an updated portable version of foobar2000 v1.3.17}
(One day is long enough to hold back)

Thanks Foobar , marc2k3 & WilB   

Re: Library Tree Discussion

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

Re: Library Tree Discussion

Reply #152
@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 1.3.9.2 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 #153
@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 #154
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 #155
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 #156
@WilB
Sounds like a great idea. Could I use this to display in descending date order ie latest album first?

Re: Library Tree Discussion

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

Re: Library Tree Discussion

Reply #158
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 #159
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 #160
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>

Re: Library Tree Discussion

Reply #161
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

Re: Library Tree Discussion

Reply #162
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 #163
New Version: Library Tree 1.4

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.

Re: Library Tree Discussion

Reply #164
New Version: Library Tree 1.401

FIX: Regression: selection issue

Re: Library Tree Discussion

Reply #165
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 #166
Does "$meta(genre,0)" IS Test work?

Re: Library Tree Discussion

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

Re: Library Tree Discussion

Reply #168
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.
*** 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.

Re: Library Tree Discussion

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

Re: Library Tree Discussion

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

Re: Library Tree Discussion

Reply #171
Hi,

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

Thank you in advance.

Re: Library Tree Discussion

Reply #172
I can't actually reproduce the issue, despite trying some very long tags, & so its not clear what the problem is. I note also that the CaTRoX playlist doesn't seem to have rendered correctly either (tracks 06, 08 & 10). So I wonder if its possibly something to do with the theme/underlying panel stack splitter handling??

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

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

To exclude a settings issue you could do the following. Right click library tree & choose panel properties. At the bottom choose export to ensure you have a back-up of panel properties. Then choose clear panel properties to reset to default to see if the issue persists.

Re: Library Tree Discussion

Reply #173
You are right about the playlist, the glitch is everywhere. I tried a proper portable installation without CaTRoX and got the same issue on Library Tree though.
I send you the folder in PM, would be great if you could find where it comes from. The problem appears when you check "View by Artist".

Re: Library Tree Discussion

Reply #174
You are right about the playlist, the glitch is everywhere. I tried a proper portable installation without CaTRoX and got the same issue on Library Tree though.
That's really weird, I could not reproduce the issue neither in playlist nor in the Library Tree script. It seems that text clipping is broken in your player for some reason.
What OS are you using? Also please attach your component list (Preferences > Components > Copy report).

@WilB: should we move this discussion to https://hydrogenaud.io/index.php/topic,111060.msg954816.html ?