mirror of
https://github.com/aome510/spotify-player.git
synced 2026-04-26 09:25:49 +03:00
[PR #272] [MERGED] map media control Pause and Resume to PlayerRequests #696
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#696
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?
📋 Pull Request Information
Original PR: https://github.com/aome510/spotify-player/pull/272
Author: @SebRollen
Created: 10/19/2023
Status: ✅ Merged
Merged: 10/20/2023
Merged by: @aome510
Base:
master← Head:create-resume-and-paused-events📝 Commits (1)
4b30905map media control Pause and Resume to PlayerRequests📊 Changes
3 files changed (+27 additions, -1 deletions)
View changed files
📝
spotify_player/src/client/mod.rs(+14 -0)📝
spotify_player/src/event/mod.rs(+2 -0)📝
spotify_player/src/media_control.rs(+11 -1)📄 Description
Fixes #271.
Currently, all of MediaControlEvent::{Play, Pause, Toggle} get mapped to PlayerRequest::ResumePause, which means the playback is toggled. In some cases, this means that the media player might send a
Pauseevent, but playback is resumed, because the playback was already paused.I ran into this issue in #271 where I would disconnect my bluetooth headphones when the playback was already paused, and the player would then resume playback through my computer speakers. Based on the logs, it appears to me that the headphones disconnecting generates a
MediaControlEvent::Pause. Instead of resuming the playback, this PR now updates the code to ensure that playback stays paused.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.