Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when pausing airplay stream #312

Closed
thefiddler opened this issue Dec 5, 2021 · 3 comments
Closed

Error when pausing airplay stream #312

thefiddler opened this issue Dec 5, 2021 · 3 comments

Comments

@thefiddler
Copy link

thefiddler commented Dec 5, 2021

DO NOT remove the blocks below, but fill these with the requested data. Incomplete bug reports will be ignored!
You should remove this comment before posting the bug report.

Describe the bug
When I pause an airplay stream, I see the following error message in the logs (journalctl -xe):

/opt/hifiberry/bin/pause-all: line 159: syntax error near unexpected token `('
/opt/hifiberry/bin/pause-all: line 159: `echo ""pause-all $PLAYER ($PPID): $DATE1 pause_process done, but playback still active"  | systemd-cat'

HiFiBerryOS version
20211105

HiFiBerry sound card
Beocreate 4-channel DSP amplifier

To Reproduce
Steps to reproduce the behavior:

  1. Monitor the logs with watch -n1 sh -c "journalctl -xe | tail -n40"
  2. From an apple device, connect to the hifiberry via airplay
  3. Start playing an audio stream (doesn't matter what, e.g. a youtube video, mp3, anything)
  4. Once the stream starts playing from the hifiberry speakers, pause it by clicking the pause button on the apple device

Expected behavior
The stream pauses and no error is printed in the log.

Screenshots
N/A

Browser (if applicable)

  • OS: iPadOS 15.1, MacOS 12.0.1
  • Browser firefox
  • Version 94.0.2

Additional context
In /etc/shairport-sync.conf, /opt/hifiberry/bin/pause-all is called:

sessioncontrol =
{
        run_this_before_play_begins = "/opt/hifiberry/bin/pause-all shairport";
        wait_for_completion = "yes"
        allow_session_interruption = "yes";
        session_timeout = 30;
}

In /opt/hifiberry/bin/pause-all:159 we have:

# Try to control the player directly, this might not work
# for all players
pause_process
check_paused
echo ""pause-all $PLAYER ($PPID): $DATE1 pause_process done, but playback still active"  | systemd-cat

On line 74 there's also this (however afaict the "not yet implemented" message is not printed, so this function is not actually called):

pause_shairport() {
  # TODO
  echo "not yet implemented"
}

If pausing shairport is not implemented, maybe it would make sense to bail out earlier in the script, e.g. in the pause_process() switch?

@hifiberry
Copy link
Owner

This is a bug in the pause-all script.

As a quick fix, just remove one of the double-quotes at the beginning of line 159 in /opt/hifberry/bin/pause-all

@chsymann
Copy link

@hifiberry just stumbled upon the same bug. there is another one of those multiple doublequotes in line 167.

@hifiberry
Copy link
Owner

Thanks. just fixed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants