rbackhouse / MaximumMPD

React Native based MPD Client for iOS and Android
MIT License
45 stars 4 forks source link

Load Playlist With Songs Randomized in Queue with Insert to "Next in Queue" Feature #82

Closed jayfar closed 1 year ago

jayfar commented 2 years ago

I just started using your app. So far it seems really cool. Nice work.

I would like to load a playlist as "background" music with the playlist songs shuffled when added to the queue. I see there is the Shuffle setting under MPD configuration, but this seems to just pick a random song to play in the queue. That does not work for me due to part 2 below...

The primary reason for my ask above is it would be cool to have a feature to "Queue Next" where a song you found outside of the playlist will be played next vs adding to the end of the queue.

Since sometimes my playlists are randomized background music until I think of a few songs I would like to hear next. With my idea, I would use "Queue Next" on some songs I found (like picking a song on a Jukebox/Touchtunes that is currently in idle play mode) and those next few songs would be inserted into the queue directly under the current song that is playing. Then once those songs are played, the queue (already shuffled at load time) wold resume where it left off. MPD shuffle would need to be turned off in settings to support this.

jayfar commented 2 years ago

Searching around a bit, I did find this feature https://github.com/rbackhouse/MaximumMPD/issues/42#issuecomment-630730637 but I am looking for my "Add to Next In Queue" to more of a Jukebox like experience where the current song is not interrupted.

rbackhouse commented 2 years ago

Currently the "Queue" action adds song(s) to the end of the queue. If there was a way to set a mode that added songs after the current one in the queue would that work ?

macmpi commented 2 years ago

It seems like track priority feature is meant for that: prioritizing track playback when in random mode

rbackhouse commented 1 year ago

Looking at the docs for "track priority" and giving it a go I think it should give the required functionality. I added some logic to the add single song code that if "random" is on then the song is also given a max priority via a "priod" call. The song gets added to the end of the queue however it ensures that the next song to be played is this one.

rbackhouse commented 1 year ago

Available in version 5.5 now in the App Stores