jeffvli / feishin

A modern self-hosted music player.
https://feishin.vercel.app
GNU General Public License v3.0
2k stars 79 forks source link

[feat] Create "Add current track" button in playlist view #560

Open will-hut opened 3 months ago

will-hut commented 3 months ago

I'm enjoying using Feishin as my music player for my library. I thought it would be nice to add a "Add current track" button to the playlist sidebar. That way, when a song is playing, I can quickly add it to as many playlists as I feel like it belongs in.

demo

Currently, I have it hiding the button if the playlist has rules (ie, a smart playlist). You can add a song to a shared playlist, but if you don't have (admin) permission, it throws an error toast.

This also allows adding duplicates of a song to a playlist, so a toggle somewhere to disable duplicates could be a nice feature.

I'm not a React dev and haven't really contributed to open source, so if there's any issues please let me know! I think I did a decent job, but I'm always looking for ways to make my code better.

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
feishin ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 3, 2024 2:23am
will-hut commented 3 months ago

This adds a feature similar to what is mentioned in #556