Difegue / Stylophone

A pretty cool™️ MPD client in .NET. Based on MpcNET.
https://tvc-16.science/stylophone-27.html
MIT License
135 stars 10 forks source link

Album covers not caching? #86

Open chowbok opened 10 months ago

chowbok commented 10 months ago

The config claims that the album covers are cached, but it seems to reload them every time I start up the app. If it is loading them from the cache, it's doing it very slowly.

Difegue commented 7 months ago

👋 I'm not quite sure what to say -- The loading should be (and is on my machine) instantaneous. We save the full-size album art so some of the cached files can be quite heavy depending on your library, but normally nothing egregious.

The album art cache can be browsed in File Explorer at %LOCALAPPDATA%\Packages\13459Difegue.Stylophone_zd7bwy3j4yjfy\LocalState\AlbumArt -- Maybe the covers aren't saving there properly?

chowbok commented 7 months ago

How many covers are you loading?

Difegue commented 7 months ago

One per album.
When it comes to the library view we wait to get the full album information from mpd before loading cover art, but I guess we could load cached data faster there if we already have it since all it needs is the album title

chowbok commented 7 months ago

What I was getting at was that if it's working fine for you, maybe you have less albums to load? Because I have around 4000.

FWIW, Cantata loads them instantly, so it is possible.

Difegue commented 7 months ago

Ah right, my mistake - I have around 1500 here. I believe Cantata doesn't rely on the albumart command.

chowbok commented 7 months ago

I looked in that cache directory and the artwork is being saved there. Does it check with the server before loading the cached image?

Difegue commented 7 months ago

It does - I've pushed some changes to try loading from cache before contacting the server, but it still won't be instantaneous due to WIndows.Storage being a fairly slow API + the fact we don't store small/bitcrushed version of cover art, so decoding can take some time depending on how large the coverart is.