mirror of
https://github.com/aome510/spotify-player.git
synced 2026-04-26 17:35:50 +03:00
[GH-ISSUE #271] spotify_player resumes playback on bluetooth headphone disconnect. #1076
Labels
No labels
bug
documentation
enhancement
good first issue
help wanted
pull-request
question
third-party
third-party
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-player#1076
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SebRollen on GitHub (Oct 17, 2023).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/271
Describe the bug
A clear and concise description of what the bug is.
When I disconnect my bluetooth headphones from my computer (either by manually turning the off or disconnecting them from my connected bluetooth devices, or by moving out of range of my computer with my headphones), spotify-player resumes playback of the current track even if it was previously paused. This means that my computer often ends up playing music unexpectedly out of its speakers,
To Reproduce
Steps to reproduce the behavior.
Expected behavior
A clear and concise description of what you expected to happen.
If the current track is paused when the bluetooth headphones are disconnected, it should remain paused.
If the current track is playing when the headphones are disconnected, I have less of a strong view of what the behavior should be.
Log and backtrace
Reference log and backtrace, which are usually located in
$HOME/.cache/spotify-player/, of a run reproducing the bug.Backtrace is empty.
Log:
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
Additional context
Add any other context about the problem here.
@SebRollen commented on GitHub (Oct 19, 2023):
Looking at my log file again, I think the relevant lines are
So the media control sends a
Pauseevent, but the player starts playing. I think this might be because the media controlPauseevent gets mapped toResumePausehere:github.com/aome510/spotify-player@4c5d25c9fa/spotify_player/src/media_control.rs (L80-L82)So if the player is already paused, this will instead resume playback. Will try to implement a fix in a pull request