[airplay] Experiment with no toggling on pause and play events (issue #1348)

This commit is contained in:
ejurgensen 2021-12-03 23:04:04 +01:00
parent 1418bfb245
commit c85867b69a
1 changed files with 3 additions and 8 deletions

View File

@ -337,18 +337,13 @@ rtsp_parse(enum airplay_events *event, uint8_t *in, size_t in_len)
static void static void
handle_event(enum airplay_events event) handle_event(enum airplay_events event)
{ {
struct player_status status;
player_get_status(&status);
switch (event) switch (event)
{ {
case AIRPLAY_EVENT_PLAY: case AIRPLAY_EVENT_PLAY:
player_playback_start();
break;
case AIRPLAY_EVENT_PAUSE: case AIRPLAY_EVENT_PAUSE:
if (status.status == PLAY_PLAYING) player_playback_pause();
player_playback_pause();
else
player_playback_start();
break; break;
case AIRPLAY_EVENT_NEXT: case AIRPLAY_EVENT_NEXT:
player_playback_next(); player_playback_next();