Skip to content

Conversation

austinried
Copy link
Owner

Fetching all cover art thumbnails up front when loading a playlist was too taxing for playlists with both many songs and many albums, so I'm removing completely the coverArt property from songs and the associated "fix" that was settings this to the album's coverArt. Now, when displaying the art for a song, we use the albumId and get the image as things are rendered instead of upfront.

(Note: the reason this was/is done in the first place is because some subsonic servers give each song a unqiue coverArt ID even when the image file is the same, which leads to duplicated images and lots of wasted space both on disk and in the cache mapping these IDs to the same file.)

This should provide much better performance for rendering large lists with many different images, but it introduces another problem: all of the images might not be present when adding that large playlist to the queue. So, to resolve that, we're now gathering those images from the cache, disk, and also potentially fetching them if missing after a song is played, and then updating the track metadata with the image. This is all done in the playback service as well so it can continue in the background if the app is closed.

Closes #106

@austinried austinried force-pushed the bugfix/large-playlist-crash branch from 5b92151 to 8c15f23 Compare April 21, 2022 04:03
fix first thumbnail not being updated on shuffle for now playing background
@austinried austinried merged commit a92ad7b into main Apr 21, 2022
@austinried austinried added the bug Something isn't working label Apr 26, 2022
@austinried austinried deleted the bugfix/large-playlist-crash branch April 28, 2022 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crashing/Freezing when loading playlist images
1 participant