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

Re: Library Tree Discussion

Reply #250

I'm not keen on debugging old versions of library tree because most releases have various bug fixes, possibly not always evident from the change log. I can't remember if there were any changes that might have affected this. It's also best to use the latest version of spider monkey panel.

In this particular case, it looks as though the library was updating since on_library_items_changed was called. Appearance of the abort message, I think, only has a short delay. From the stack trace, library tree was in the middle of updating the tree.

In general tree updates in response to library changes should be very rapid and occur in the background: only affected items in the tree are altered.

Aborting scripts part way through may give unpredictable results and a script error. What happens if you just let library tree continue and finish? If that's OK, perhaps choose don't ask me again & don't worry about it.

As a test I just tried changing 24,000 tags. All proceeded fine on my device in that scenario. There was no message.

Library Tree also has an option to switch off automatic syncing with the media library: panel properties: "ADV.Library Sync: Auto-0, Initialisation Only-1". If auto-syncing is off the library used by library tree will only be updated on initialisation, view change or through manual refresh on the menu.

I have seen the abort message on a number of occasions when it isn't really the script that's at fault, e.g. if windows is busy (e.g. updating) and necessary files can't be read from the hard drive in a timely way. Then scripts can stall at points difficult to predict and the message can appear.

Re: Library Tree Discussion

Reply #251
Without changing the font size, add line-height setting function?

Re: Library Tree Discussion

Reply #252
See: menu … options > mode > line spacing

Enables line height to be padded as required. I think adding padding is more flexible than setting a fixed line height.

Re: Library Tree Discussion

Reply #254

Hello WilB, even with this last version I am getting this error:

Error: Spider Monkey Panel v1.2.2-preview+0db3c6a4 (Library Tree v2.1.2 by WilB)
OrderByRelativePath failed:
allocation size overflow

File: <main>
Line: 542, Column: 61

Stack trace:


Hello WilB, any news about this?
I am still having this blocking error.
Regards, Andrea

Re: Library Tree Discussion

Reply #255
As far as I am aware this seems to be a bug in spider monkey panel and outside of my control, but I am open to suggestions. I just tried again with a 642K test library & all was OK here. That particular error seems to be occurring on panel initialisation and is explicitly related to view by folder structure. So you could try a different view (if the error is locking you out you could open panel properties and find SYSTEM.View By [it's probably the last entry] and change it to 1 to set a different view).

I thought you were debugging the issue with @TheQwertiest? It sounds as though the issue is reproducible and so it ought to be possible to resolve the cause.


Re: Library Tree Discussion

Reply #256
Hello WilB, thanks for caring about and for the new tips.
I already notified @TheQwertiest of the problem and he promised me a debugging version of SMP that I am still waiting for...
And, moreover, he wrote that the problem was looking to be related to your script...
Now, having your new feedback, I will go back to him again.
Many thanks and kind regards, Andrea

Re: Library Tree Discussion

Reply #257
And, moreover, he wrote that the problem was looking to be related to your script...
I've never said such a thing though :\
The problem with `bad_alloc` in `OrderByRelativePath` is most likely a memory exhaustion problem. Theoretically, script could reduce memory usage by operating on smaller arrays or storing less data, but that would greatly increase complexity of the script.

Re: Library Tree Discussion

Reply #258
@WilB and @TheQwertiest
Sorry for having misunderstood the matter ... I am not a developer... (:->)
Thanks for eventually find out a solution.
Library Tree is looking very nice and I would be glad to be able to use it.
Kind regards, Andrea

Re: Library Tree Discussion

Reply #259
Hi. I was using an old version of Library Tree with JS and it worked fine except that a Custom field I use %GEOGRAPHICAL% refuses to split multiple fields: some bands originate from more than one city/country, etc. The fields work fine everywhere else (they are originated in Mp3tag), and are separated by a <;>. So I just tested installed the new LT 2.1.2, but in this version, I cannot get the <Settings, View by> to save. I first tried importing an .wsp file (exported from the earlier version) and, although the new config shows in Panel Properties fine, they do not change in the options. It just shows the original config (ie: no View by Geog" shows. I then manually edited it, and it doesn't save. Is there something in the new version that I am missing? Many thanks for any help. Attached is the exported example.

Re: Library Tree Discussion

Reply #260
It looks like you tried to import the JScript panel properties which isn't supported by the Spider Monkey Panel version of Library Tree. This has resulted in duplicate entries in panel properties and you changed the wrong one.

You need to clear panel properties to reset them. Then you should be able to enter, e.g.
Code: [Select]
View by Geog // %<geographical>%|[%album artist% - ]%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
Note that geographical in the view has to use the multi-value syntax as in the example to split multi-value tags. %geographical% will not split them.

Re: Library Tree Discussion

Reply #261
Brilliant, thanks! That got the new version working, but
<View by Geog // [%<geographical>%]>
 still doesn't split the tags, as  shown in this image...

Re: Library Tree Discussion

Reply #262
I think that's actually to do with foobar2000 and not library tree.

Select a track. Open the properties of the track. Select the geographical field, right-click and choose split values. When confident it's working you can select multiple tracks.

foobar2000 also has an advanced setting in preferences: display > properties dialogue > multivalue fields.
You can add GEOGRAPHICAL to the list. That seems to help when creating new multivalue geographical tags through properties, but didn't seem to cause existing to be split. For that you have to use the above method.

Re: Library Tree Discussion

Reply #263
Brilliant! Thanks to your help, I have found the reason it isn't working:
In the fields with multiple values, I have used a space after the delimiter <; > (Australia: Cairns; England: Ellesmere Port). Removing the space <(Australia: Cairns;England: Ellesmere Port)> makes the field split fine, but it looks ugly! I wonder if there is there a way to force it to read <; > instead of <;> (ie. with the following space)??? Otherwise, I'll have to re-tag them all. Although that's fairly simple with Mp3Tag, it would force re-copying of so many files during backup, as there are thousands tagged this way!

Re: Library Tree Discussion

Reply #264
I tried the following with the space after the ;
Australia: Cairns; England: Ellesmere Port
View by Geog // %<geographical>% splits the tag fine and displays correctly as in the picture.

However it was necessary to run the split values command as I said in my previous post. It looks like you didn't do that????? Select a track, open properties for the track, right click the geographical tag name and run Split values.... Once you know its working correctly you can do all music in one go in a few seconds. Much easier than retagging. Also see my comment in my previous post concerning display > properties dialogue > multivalue fields.

Also Library Tree now requires FontAwesome for proper display of symbols, and from your picture it looks as though it's not installed. There's a link to it in the Library Tree download location.


Re: Library Tree Discussion

Reply #265
Thanks. I did do that, yes, to test a few and it did work. Are you saying I need to do it every file which has multiple geog tags? And what then happens to new ones I add?

Re: Library Tree Discussion

Reply #266
Thanks. I did do that, yes, to test a few and it did work. Are you saying I need to do it every file which has multiple geog tags?
And what then happens to new ones I add?
These are all general foobar2000 handling issues and not specific to library tree. It may depend on what tagger is used. You may need to split them...

Re: Library Tree Discussion

Reply #267
Thanks for all your help.  :D

Re: Library Tree Discussion

Reply #268
Hello WilB, today I was finally able to run Library Tree 2.1.2 ("special version").
Thanks to @TheQwertiest new method "OrderByRelativePathV2" requiring less memory and other SMP memory tuning, now Library Tree is running ... but it eats approximately 400 MB of RAM.
So, I know, it is just a matter of time and I will run out of memory again.

At this point, I have a 1 milion dollar question for you: does it is difficult to move all the libray dBase to an external SQL mini dBase and then from the SMP/JS just query this SQL?

Kind regards, Andrea

Re: Library Tree Discussion

Reply #269
In the tests I've done library tree uses ~5 MB of memory per 10K of tracks:
library 2.5 MB + up to an extra 2.5 MB if a search returns all the library.

Values are based on using Spider Monkey Panel window.TotalMemoryUsage.

That seems quite low. But it's a question of scalability.

10K library = ~5 MB
50K library = ~25 MB
100K library = ~50 MB
200K library = ~100 MB
600K library = ~300 MB

Actual values depend on complexity of patterns and could be a bit lower or higher. In the case of folder view it will depend on the depth of the folder structure and length of the folder names.

It seems your 600K library is using ~400 MB. I assume that's after searching. I wouldn't really expect it to go up much more. Spider Monkey Panel memory management has improved a lot in the more recent versions.

I don't know anything about use of SQL, so it would be a difficult task. Not sure if it would reduce memory use or not, since if it had to be read in before loading the library and doing a query it may not anyway.

Re: Library Tree Discussion

Reply #270
New Version: Library Tree 2.1.3

NEW: $stripbranchprefix{X}. Adds ability to strip the prefix of all values in multi-value tags, e.g. $stripbranchprefix{%<artist>%}. Complements already present $swapbranchprefix{X}. Specify prefixes in panel properties: ADV.Prefixes to Strip or Swap ... (default prefixes: A + The). Note new property name. See documentation for more info.

CHG: Various optimisations.

FIX: Reported issues.

Re: Library Tree Discussion

Reply #271
Many thanks, @WilB, for your kind reply.
All the best, Andrea

PS: I am going to install the new Library Tree 2.1.3...(:->)

Re: Library Tree Discussion

Reply #272
PS: OrderByRelativePathV2 will replace the old one in the next SMP release (and nightly as well), so there will be no need to change anything in the script.


Re: Library Tree Discussion

Reply #273
Hello @TheQwertiest, I installed the new Library Tree 2.1.3 using the last SMP beta you gave me directly.
With this beta I was testing the V2 method, however it can have the new LT 2.1.3 running fine with it.
Does this SMP beta you gave me implements both V1 and V2 in the V2 new mode?
Or am I just very lucky?
Regards, Andrea

SimplePortal 1.0.0 RC1 © 2008-2020