mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[PR #1495] [MERGED] Send playback position as player event #1418
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#1418
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/librespot-org/librespot/pull/1495
Author: @fragsalat
Created: 4/28/2025
Status: ✅ Merged
Merged: 5/3/2025
Merged by: @photovoltex
Base:
dev← Head:dev📝 Commits (7)
84c6849Send play progress as PlayerEvent::PositionChangedf26e3deReplaced PlayerEvent::PositionChanged with set_progress_callback() methode8b3652Revert "Replaced PlayerEvent::PositionChanged with set_progress_callback() method"af8372aAdded opt-in config in PlayerConfig for progress event9119a06Added doc comments and set default position interval to 1sec for standalone7e6290cRemove handling of PositionChanged in standalone binaryb1a789bFixed wrong event handling📊 Changes
5 files changed (+34 additions, -0 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
playback/src/config.rs(+4 -0)📝
playback/src/player.rs(+26 -0)📝
src/main.rs(+1 -0)📝
src/player_event_handler.rs(+2 -0)📄 Description
Fixing #1493
Hey there, I did an example implementation how the playback position could be sent to the user of the Player struct.
The change should be backward compatible and I did throttle the sending of events by only informing every 250ms.
Please tell me in case you prefer a different solution or would like to change something else.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.