beefweb icon indicating copy to clipboard operation
beefweb copied to clipboard

Play one song only?

Open me2d13 opened this issue 6 years ago • 2 comments
trafficstars

Would it be possible to add support to API for playing one song only? Suppose I have playlist with many songs, want to play one in the middle and then stop. If I use /api/player/play/playlist_id/index then it skips to next track after playing the one I requested via API call. So I would need even some "stop after current" flag/mode or similar API that would play just the one song. Without this API I would have to "flood" foobar with status requests to find the moment when the truck ends and do explicit stop API call in that moment.

me2d13 avatar Mar 08 '19 22:03 me2d13

I'm not sure if this is available via foobar2000 SDK, if it is then it could be implemented.

You can always enable stop after current manually and keep it enabled. Or just create new playlist with single track and not enable looping.

hyperblast avatar Mar 10 '19 17:03 hyperblast

Thanks for info. I'm not that familiar with foobar's SDK but I had a quick look and found in playback_control.h code //! Alters stop-after-current-track option state. virtual void set_stop_after_current(bool p_state) = 0; So it seems it should be at least possible to toggle this flag through API. If this could be added to your rest api it would satisfy my needs :-)

me2d13 avatar Mar 10 '19 20:03 me2d13