Add Support for Downloading All Songs in an Album or Playlist #85
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.
First off, I want to thank all contributors of Koel. The website/server and app both look amazing and work really well. Now to the pull request:
These changes address issue #63 for downloading all songs of an album (or playlist). Basically, I copied the SongCacheIcon to SongListCacheIcon which expects a list of songs instead of a single song. I modified the code slightly to update its download/downloading state based on all songs in the list. Furthermore, the download() method downloads up to three songs in parallel. To inform each song about its downloading state, which can now change from outside (i.e. the album or playlist) I also added a new StreamController to broadcast when a download has been initiated.
If there are any further changes or tweaks you'd like me to make, please don't hesitate to let me know.