-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add current played track to preselected favourite playlist #7
Comments
There's probably a better way to do this, but I do it in a shell script like this:
If I save this in The script above could be shortened a bit, the reason for the extra functions is that I have multiple favourite playlists (for different genres etc.) and the full script displays a list of them, and I can press a key to choose which list the currently playing song should get added to. Open to any suggestions about a better way of getting the details of the currently playing song too, as my solution above works but it feels like a bit of a hack. |
In the the default client, it is possible to add command What I did not recall, but your code brought me to some idea for playing around, that it is possible to use (at least, but max?) one variable argument. As for the alias(es), like
The aliases can be used like (from inside client): or, like in your script prefix with If there is, one positional argument possible - I really do not know otherwise, I would end up like some alias like that This works. If I hardcode the playlist. Works using the "ID" like: But using two variables as alias: Did not work for me - or using positional values. This would be almost exactly do what I would like to have/archive, in addition to your shell script. Unfortunately I do not know, another way of how to get the track id. |
Positional parameters look like they've been implemented, maybe lines 39 and 57 might give you some ideas. But yes, getting the currently playing ID seems like the tricky bit. It looks like the value is parsed as a collection, but I can't see any collection grammar for returning the current track ID. |
@Malvineous - I found a very decent way to get only the "id": What is basically does: So, you very much simplify your script code without grep and sed and only use the return value of: You can also use I overworked your script a little bit, and it works like a charm:
One more edit: Could also be: Or anything like that. To fetch the "current" information one call. |
Ohh that's a much better solution, I can't believe I never noticed the |
Hello, as the title states:
It would be nice to have the option to add the currently played/queued track to a favorite playlist.
How it might work:
playlist setfavorite *nameOfPlaylist*
to setnameOfPlaylist
as, current favorite playlist.playlist favorite
or even onlyplaylist favor
to add the currently played/queued track to the above favorite playlist.The text was updated successfully, but these errors were encountered: