fow5040 / Flow.Launcher.Plugin.SpotifyPremium

Spotify Premium plug-in for Flow Launcher
MIT License
31 stars 2 forks source link

[Feature request] Ability to remove a song from current playlist #19

Open marcinkunert opened 1 year ago

marcinkunert commented 1 year ago

I would love a feature that allows to remove a song from current playlist.

I create a playlist from the "Discover weekly" generated playlist. Afterward, I listen through it a few times during the week and delete all the songs I don't like. After the week, the remaining songs are added to my general/work playlist.

It would be nice to be able to remove the songs I don't like with Flow Launcher.

fow5040 commented 1 year ago

Interesting use case. Since this is more than thinly wrapping client commands, couple other questions and uncertainties around where to 'draw the line' for the client

A nice quality (limitation?) the plugin currently has is how simple and stateless commands can be with this plugin - i.e you're not really navigating a menu, you're typing a command and it finishes. The order you execute commands in does not affect what happens.

This is in contrast with the macOS Alfred spotify plugin (which I imagine this took some inspiration from) in that the other plugin aims to essentially be a full, navigatable spotify client replacement. Since the scope of what the alfred plugin 'needs to do' is much larger, it also makes the commands much more complex and stateful - i.e:

  1. you run one command to select a playlist
  2. you scroll down
  3. you select a song
  4. you then then select another action based on what song you selected.

This makes the chain of commands more complicated and you lose the nice 'one to one' mapping of text strings to client commands since the string of interactions becomes stateful. I'd really like to avoid going that route but maybe there's a compromise where we can simulate these complex interactions but keep the input commands 1-to-1 with the output you'd expect.

dharrison4 commented 1 year ago

Not OP, but this is how I would imagine this going. I'm also interested in this as a feature forming a part of a larger set of features.

Dang, I wish I could participate in pulling and upgrading. Better get back to my Python lab after I've written this...

I imagine the OP would be listening to a playlist that he created and wants to just remove the current song from the current playlist.

sp remove

That's it. That's all he asked for. I think this should be something that you could enabled or disable via settings, too, as it might start to clutter up the neat list of commands that we currently get.

Problem comes when you need to consider context within Spotify. E.g. what if a user is listening to an album instead of a playlist? The 'remove' command would just not do anything. Maybe even spit out text in flowlauncher bar itself: 'cannot remove song from album.'

This could open the door to a handful of other similar uses such as

sp like - toggle

This removes or adds a heart/like/whatever-spotify-call-it-next, the current SONG to the current playlist.

Does this make it more doable as a 'one and done' approach that you've cultivated here?

fow5040 commented 1 year ago

This and #24 seem to be the same suggestion, I'll see if the API supports liking.

There are both GetSaved() and SaveTrack() functions, I'll tack this on as another TODO item along with making a settings menu.