Bugfix/large playlist crash #111
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'scoverArt
. 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