Before I realized that, I remembered that I had a request recently and that I could use that request to illustrate a solution for what you're asking. I guess I have just solved both issues. :-)
Typically, you would want to extend a com.tagtraum.beatunes.action.BaseAction and then perform the desired task in the actionPerformed(event) method. This would be a perfectly valid approach. To create a new playlist, you'd do something like (Java code):
And then simply add tracks to the newly created playlist.
To get the tracks you want, you could use the method getSelectedPlayList(), call getSongs(), filter the iterable in the way you want it, and then call something like newPlayList.addSongIds(newSongIds). Note that it's always preferable to work with ids rather than AudioSong objects.
Thank you so much!I have been trying to figure out a way to automate this off and on for at least 2 years but haven't ever gotten very far.You are a life saver Sent via the Samsung Galaxy S10, an AT&T 5G Evolution capable smartphone
-------- Original message --------From: hendrik <[email blocked]> Date: 8/28/21 5:51 AM (GMT-06:00) To: [email blocked] Subject: Re: Opening a single playlist with Groovy [Plugin #2017]