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: Album art caching (Read 2051 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Album art caching

Hi everybody,

One of my foobar configs relies heavily on album art :
- Facets displaying album art for all my items
- Plus either the standard album art component, or JScript album art for the selected item

Everything displays perfectly. I only have two minor issues :
- The album art doesn't load fast enough for my taste. Is there a way I could cache it somewhere ? (physical drive, or even better, in a RAM cache). I'm open to all solutions.
- Once the album art has loaded, foobar starts to behave quite slowly, even for other operations that don't involve album art at all, with the album art not even displayed on screen. And then I have to restart foobar for it to behave normally again.

Any hints to optimize my config ? Thanks !

Re: Album art caching

Reply #1
Wow, it's getting hard to get somebody to reply to a new topic these days ^^

Re: Album art caching

Reply #2
Hey there,

Well, here is a recent comment in a similiar thread ;) -

Quote from: Case
I'm not sure if it's made clear but the loading and scaling and caching of album art is the job of whatever component is displaying the art for you. The core foobar2000 just gives components the data when they ask it. I fear you won't get any such changes to Facets as it hasn't been updated in a long time.

Do you keep the art tagged internal or external? I would think external JPGs would be faster. I also limit mine to no more than 1000x1000px and 250kb filesize (though also keep the extra large ones with a different filename that foobar does not see).

I used to use an external USB drive over Wi-Fi to store music and that was ridiculously slow at times, so after suffering that I decided to buy an SSD which reads everything pretty fast. Although to be honest I never have lots of covers on display at once, so that probably helps too.

Cheers

Re: Album art caching

Reply #3
Thanks anamorphic.
I guess Facets could use an option to enlarge its cache. But knowing its developer, it's unlikely that it will hapen.
The artwork is external and located in every folder.
I have several TB of storage so a SSD is not an option (I have an SSD, but it's a 256 GB one, for the OS and apps). Maybe in 5-10 years !
So currently everything is stored in HDDs.

That being said, I'm especially concerned about the fact that "Once the album art has loaded, foobar starts to behave quite slowly, even for other operations that don't involve album art at all, with the album art not even displayed on screen. And then I have to restart foobar for it to behave normally again". That behaviour doesn't look normal to me. Would it be Facets fault then ?

Re: Album art caching

Reply #4
Facets is the wrong tool for the job, for the reasons already discussed - no caching and poor performance.

Try replacing the facets cover display with "JS Smooth Browser" which was originally written by Falstaff and is a sample script in WSH/JS/Spider Monkey panels. It features caching and the performance is superb (and highly customizable) - I use it with external images in folders on external drive and it displays with virtually no delays. It has smooth scrolling/ctrl-click resizing with mouse wheel and other nice features.

Wish we saw more of Falstaff around here.


Re: Album art caching

Reply #5
Thanks. I have followed the instructions, but so far I can't seem to install JS Smooth Browser :

Code: [Select]
Error: JScript Panel v2.1.8 (JS Smooth Browser v20151114-1630-340 by Br3tt aka Falstaff >> http://br3tt.deviantart.com)
JavaScript compilation error:
Syntax error
File: C:\Program Files (x86)\foobar2000 (test)\js_br3tt\jssb\js\JScommon.js
Line: 540, Col: 8
    }; else {

I have foobar2000 1.4, JS Panel 2.1.8, and latest JS Browser from here : https://www.deviantart.com/br3tt/art/JS-Smooth-Browser-571376160
And of course the js_br3tt folder that came with JS Browser is inside my foobar2000 folder.
Any hints ?

Re: Album art caching

Reply #6
The deviantart sources are old and only work with the WSH panel (which itself is only useful for XP or other fossils).

If you did a fresh install of JSPanel component, there should be a samples folder here: %profile%\user-components\foo_jscript_panel\samples\js-smooth
there should be a text file: JS Smooth Browser.txt

create a new JSPanel in your layout or scratchbox and then paste the text of that file into the panel.

btw, spider monkey panel is the newest version of those panels and should give the best performance. It will have samples\JS Smooth Browser.txt in it's user component folder also.
https://hydrogenaud.io/index.php/topic,116669.msg965043/topicseen.html

Re: Album art caching

Reply #7
Ah, that's more like it :) It works indeed ! Thanks mjm716.
I'll begin testing right away. I just wish it had more sorting options than just album, artist and genre. One point for Facets ! lol
PS : no, I still have Windows 7 SP1 ;)

Re: Album art caching

Reply #8
rt-click at the top and select 'panel properties'.

In that window you can copy your facets sorting title format into album/artist/genre fields.

btw, SMPanel should work fine with 7. Its other big advantage is it is supported by TheQwertiest, while JSpanel is slowly dying I believe.

Re: Album art caching

Reply #9
That's a great tip, thanks !
Unfortunately it doesn't seem to work in my case.
A word about my collection : I don't have any %album% tags, I use other custom tags.
I'm trying to sort by %title%, so I have replaced the contents of "Sort Order - ALBUM" by just "%title%" and made sure that sorting by album was selected.
But no, I think the js script just keeps looking for an %album% tag, and since it doesn't find it, it just displays my whole collection as one single item called "SINGLES".

Re: Album art caching

Reply #10
Adding an image or more info about your layout is probably useful if you want better assistance, however I put %title% in the ALBUM sort and all of my albums sort by the first song on the album, so yes it does work as it should.

If you have a group of songs on an album, how would you expect an album sort by title to work?

One could put more complex title format there and it also works.

For example, if one uses 'Various Artists' in %album artist% to tag compilations, this sort will keep them together:
$if($strstr(%album artist%,Various Artists),Various Artists,%artist%)

There are many older threads here with very creative/complex title format ideas - TF basics haven't changed, so the threads are still relevant.

Re: Album art caching

Reply #11
I guess I'll have to keep trying then !

FYI I'm using this particular foobar config to handle only video files, so there's no %artist%, %album%, %album artist% or %tracknumber% fields.
I'm guessing maybe the js script just doesn't work well if there's no %album% or %album artist% fields.

There is however always a %title% field. So yes, I should be able to sort them by %title%.
Sure, I would also like to use more complex titleformatting. But I'd first need to make the "%title"% sort work, and then I'd be able to move on.

EDIT : also, the default behaviour of JS Smooth Browser is to display %title% and %artist% in the 2 allowed text lines per image and in that order.
But since I don't have any %artist% field, it only displays %title% and then "?" on the second line, for all my items. I guess I can't change that either.
So the "solution" would be to duplicate two of my tag fields : copy all my %title% in %album%, and all my %date% in %artist%.
But that's not a pretty solution : I don't like it and I won't do it.
Another solution, more elegant, would involve changing the js script so that it handes %title% instead of %album% and %date% instead of %artist%.
But I don't have any skills to do that (any takers ?).
So ultimately, maybe Facets is not so bad for my case...

Re: Album art caching

Reply #12
I thought there was an option to turn the "album/artist" labels off.

If you are using grid mode, you can edit this file to turn the labels off:
%profile%\user-components\foo_jscript_panel\samples\js-smooth\js\jssb.js

Comment out (turn off) the following lines by placing // at the front of each. Resave the file and reload the panel.
2181
2183
2269-2275

that's the best option I have.

Re: Album art caching

Reply #13
Actually I wouldn't want to turn the album/artist labels off. I like the concept.
I just wish I could replace them with title/date, that's all.