Add individual track download (closes #100)#103
Conversation
Allow single songs to be downloaded for offline playback via the long-press more-options sheet. Previously only albums and playlists could be downloaded. - Add 'song' to CachedMusicItem and DownloadQueueItem type unions - Add enqueueSongDownload(song) to musicCacheService - Export enqueueSongDownload from moreOptionsService - Update canDownload() in MoreOptionsSheet to include songs - Update handleDownload to call enqueueSongDownload for songs - Update music-cache-browser to display 'Song' label for song items - Update redownloadItem to handle the new 'song' type - Add tests for enqueueSongDownload Closes ghenry22#100
Show a per-track download button in the Now Playing screen alongside the heart icon so users can cache the current song without leaving the player. - Extend DownloadButton to accept type 'song' (caller provides onDownload) - Add PlayerDownloadButton component to player-view - Disable download trigger in offline mode (status still visible) - Mock DownloadButton in player-view tests
|
Re: CI translation failure The translation validation errors ( My branch makes zero changes to any git diff master -- src/i18n/ These keys exist in
|
|
Yeh just ignore the translation thing, I have pushed a rule update that just warns rather than bombing CI on translation gaps. Thanks for the PR, I will review this but I need to also implement song based browsing otherwise there is not a good way to actually browse and play the offline songs. Song browsing and downloading is towards the top of my todo list, I have an update with a bunch of stability work and fixes in it to go out shortly then this will be worked on for the next update after that. I am trying to push updates out roughly once a week so I don't burn all my CI credit! |
|
Hey! Thanks for the update, the recent changes look great. I was wondering if you have a place where you track upcoming features or things you're currently working on? I'd really love to contribute more, and it would help me focus on areas that are actually useful for the project 🙂 I was quite excited about my previous contribution 😿 , so I'd love to keep helping |
Thanks for taking the time and effort to make a PR for this. I already had a plan and work underway for how I wanted to handle surfacing individual songs in the library list and as downloads. This work has all been completed and is now in github, it will roll out in the next release. For a list of features it is generally what is logged on github and then things from my own testing that roll in as well. I do have a specific way that I want to handle somethings (particularly bigger features like carplay/android auto, gapless playback etc). While I might not merge every PR they are still extremely useful as a reference when I do implement the functionality and I certainly appreciate the community contributions! |
Allows users to download single songs for offline playback.
Changes:
useDownloadStatus('song', id)— no changes needed inTrackRow/SongRowImplementation:
enqueueSongDownload(song)inmusicCacheService— stores the track under its own ID as itemIdDownloadButtonextended to accepttype: 'song'MoreOptionsSheetcanDownload()now includes songsCloses #100