Save tracks to library from dot menu #559
Open
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.
This PR fixes #505.
Current status:
At the moment, tracks can only be saved/removed through the multi-selection mode. In the 'saved tracks' view, tracks can be removed from the library through the multi-selection mode. In all other places they can be added to the library (but not removed, if they are already in the library).
My implementation:
I implemented the functionality to add/remove track to/from the library, through the dot menu of a track. This functionality also updates the 'saved tracks' view. Tracks can now be saved/unsaved from:
The issue description also suggests adding/removing tracks through a button in the now playing bar, but I decided against implementing the functionality that way, as I think it will clutter the UI too much.
This is how the dot menu of a track looks now:
![image](https://user-images.githubusercontent.com/60743257/197954363-0e43bd6b-6f8d-45bd-b2f3-502a92f888b6.png)
Discussion/ Problem:
I realized that currently there is no way of checking if a song is already in the library or not (maybe there is, but I just missed it, then let me know). So I always display the add and remove entry in the dot menu, however it would be cleaner to only display one, depending on the like-status of the song.
I also realized that at the moment tracks can be saved through the multi-selection mode in many places (playlist, album..) but not removed. Tracks can only be removed in the 'saved tracks' view, through the multi-selection mode.
Is this a design choice? Then I could also only display the 'add to library' entry in most places (playlist, album..), and the 'remove from library' only in the 'saved tracks' view
I'm more than happy to discuss these problems and change by PR