Clear Queue from Here
Hi thanks for this handy utility Currently when clearing the queue in Music Assistant it just nukes everything and stops playing immediately. Would it be possible for mass_queue to add a function to "Clear Playlist from Here" ?
i.e. truncating from the specified track onwards, and not stopping the currently playing track, so it could finish gracefully if it was the last track?
That's not something that can be done - the MA API doesn't have an endpoint to remove all.
As a workaround, you could try adding an item to the player queue and choose the enqueue option "Play Next and Clear Queue".
Another idea here is that you could iterate over the "remove from queue" and remove anything below the targeted song. I'm doing that for another use case with this library and it appears to be working fine.
oh thank you so much @coltoneshaw this suggestion 100% helped me to create a HA script that performs the result i was hoping for. So i'm a happy camper.
@droans it would be a great bonus if it could be added as a native function of Music Assistant Queue Actions
I've added it in the v0.8.0-b1 beta.
I don't think this will provide a good experience, though. The integration will fire multiple events for each item that's removed. Anything which relies on these events - including the Music Assistant Player Card - will be bombarded. The Player Card will likely make an even worse experience as it continues requesting the updated queue from the integration.