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 57045 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Library Tree Discussion

Reply #300
You really shouldn't bother with a JSP version. As mentioned a few posts up, newer versions of JSP require windows 7 just like SMP so all users of your scripts should be on SMP by now. Even the Georgia theme has a SMP version now (currently beta but should be released fully soon).


Re: Library Tree Discussion

Reply #301
Just had this script crash (see below). I'm using 1.4.2 of SMP.

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

File: Library Tree 2.1.3.js
Line: 1635, Column: 11
Stack trace:
  Populate/this.buildTree/</<@Library Tree 2.1.3.js:1635:11
  Populate/this.buildTree/<@Library Tree 2.1.3.js:1634:23
  Populate/this.buildTree@Library Tree 2.1.3.js:1628:12
  Populate/this.buildTree/<@Library Tree 2.1.3.js:1647:42
  Populate/this.buildTree@Library Tree 2.1.3.js:1628:12
  Populate/this.branch@Library Tree 2.1.3.js:1570:14
  expandCollapse@Library Tree 2.1.3.js:2012:10
  Populate/this.lbtn_dn@Library Tree 2.1.3.js:2049:26
  on_mouse_lbtn_down@Library Tree 2.1.3.js:2889:192

Re: Library Tree Discussion

Reply #302
I wasn't able to reproduce the issue. You can try replacing lines 1632-1639 with the following, which ought to fix it.
Code: [Select]
switch (true) {
case l != -1 && !showTracks:
range(item.item).some(v => {
if (lib.node[v] && (lib.node[v].length == l + 1 || lib.node[v].length == l + 2)) return item.track = true;
});
break;
case l == 0 && lib.node[item.item[0].start] && lib.node[item.item[0].start].length == 1: item.track = true; break;
}
Else the fix will be in the next version.

Thanks for reporting.

Re: Library Tree Discussion

Reply #303
Not sure if it's feasible, but a reverse sorting function specifically for the date field would be nice. I wish to be able to sort albums chronologically in order of newest to oldest.

Re: Library Tree Discussion

Reply #304
You can use $nodisplay:

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

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

Re: Library Tree Discussion

Reply #305
You can use $nodisplay:

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

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

Thanks very much! I wasn't aware of such a syntax. Looking forward to the next version.

Re: Library Tree Discussion

Reply #306
Hi WilB,

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

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

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

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

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

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

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

Thank you for your feedback, much appreciated!

Re: Library Tree Discussion

Reply #307
1. That's a bug fixed for the next version. It's a trivial fix: there's a break missing in the menu handler on the end of line 2837.

2. That was a design decision so there's always a visual hover indicator. If you want to change the behaviour, you can try searching the script for:
this.hand = true
change to:
this.hand = false
There should be two instances.

Re: Library Tree Discussion

Reply #308
Thank you, changing the value to "false" in line 2124 did the trick :)

Re: Library Tree Discussion

Reply #309
New Version: Library Tree

v2.2.0-Beta.1

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


 
Updated features summary
- Tree viewer + album art support.
- Library and playlist sources.
- Single panel and two panel modes.

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

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



Re: Library Tree Discussion

Reply #310
@WilB
Nice new version. Thanks.

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

Sorry originally posted in wrong thread.

Re: Library Tree Discussion

Reply #311
Currently, SMP only has plman.IsAutoPlaylist and plman.IsPlaylistLocked which both return booleans and is unable to determine the type of locks in place.

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

Maybe the script should check for plman.IsAutoPlaylist instead. They're guaranteed to be read-only and any attempt to update a playlist lock which prevents the adding of new items would silently fail.

Re: Library Tree Discussion

Reply #312
plman.IsAutoPlaylist also seems to resolve the original reason for making the change. Thanks for the info.

I'll change it for the next version.

@Black_Over_Bills_Mothers
If you don't want to wait for the next version there are two instances of plman.IsPlaylistLocked that can simply be changed:
menu: line 154
populate: line 1276

Re: Library Tree Discussion

Reply #313
@wcs13
Quote
I'm using Library Tree to retrieve songs that are similar to the currently playing song, and put them into a special playlist. The following doesn't work in my case:
Code: [Select]
comment HAS $nowplaying{$meta(artist,0)}
Quote
...But sometimes my comment field has info that looks like this: "This song contains a sample from {Song title} by {Song artist}".
In that case, I'd like to retrieve {Song title} by {Song artist} in my library and add it to the special playlist. Can that be achieved ?

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

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

Moved discussion from uploads.

Re: Library Tree Discussion

Reply #314
This "Library Tree" is awesome and heavily configurable ;
Thank you for your impressive work.

Re: Library Tree Discussion

Reply #315
@wcs13
Quote
I'm using Library Tree to retrieve songs that are similar to the currently playing song, and put them into a special playlist. The following doesn't work in my case:
Code: [Select]
comment HAS $nowplaying{$meta(artist,0)}
Quote
...But sometimes my comment field has info that looks like this: "This song contains a sample from {Song title} by {Song artist}".
In that case, I'd like to retrieve {Song title} by {Song artist} in my library and add it to the special playlist. Can that be achieved ?

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

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

Moved discussion from uploads.
Not related to this script, but you can achieve exactly that with dynamic queries
COMMENT HAS #TITLE# AND COMMENT HAS #ARTIST# (will fully expand if there are multiple artists, or you can use $meta() if you want only one)

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

X

X

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

You can even automatize the steps with a macro. Find the now playing track, apply the query to it, select the tracks retrieved by the query and send them directly to the autoplaylist you want with one click.

Re: Library Tree Discussion

Reply #316
My two cents:

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


Re: Library Tree Discussion

Reply #317
My two cents:

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

Update:
- Items with no %album% are sort as "--- Singles ---"
- Items with %album artist% == %PUBLISHER% are sort as "--- Compilations ---"

 
SimplePortal 1.0.0 RC1 © 2008-2021