mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[PR #1053] [MERGED] Major Events Overhaul #1211
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#1211
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/1053
Author: @JasonLG1979
Created: 8/23/2022
Status: ✅ Merged
Merged: 9/22/2022
Merged by: @roderickvd
Base:
dev← Head:connect-event📝 Commits (1)
8545f36Major Events Overhaul📊 Changes
17 files changed (+1223 additions, -623 deletions)
View changed files
📝
CHANGELOG.md(+11 -0)📝
connect/src/spirc.rs(+201 -100)➕
contrib/event_handler_example.py(+77 -0)📝
core/src/authentication.rs(+1 -1)📝
core/src/session.rs(+41 -0)📝
examples/play.rs(+1 -1)📝
metadata/src/album.rs(+1 -1)📝
metadata/src/audio/item.rs(+231 -67)📝
metadata/src/audio/mod.rs(+1 -1)📝
metadata/src/episode.rs(+3 -29)📝
metadata/src/error.rs(+4 -0)📝
metadata/src/image.rs(+7 -0)📝
metadata/src/track.rs(+2 -41)📝
playback/src/audio_backend/alsa.rs(+30 -16)📝
playback/src/player.rs(+318 -183)📝
src/main.rs(+12 -60)📝
src/player_event_handler.rs(+282 -123)📄 Description
Special thanks to @eladyn for all of their help and suggestions.
Add all player events to
player_event_handler.rsMove event handler code to
player_event_handler.rsAdd session events
Clean up and de-noise events and event firing
Added metadata support via a TrackChanged event
Add
event_handler_example.pyHandle invalid track start positions by just starting the track from the beginning
Add repeat support to
spirc.rsAdd
set_position_msandset_volumetospirc.rsSet
PlayStatusto the correct value when Player is loading to avoid blanking out the controls whenself.play_statusisLoadingPlayorLoadingPauseinspirc.rsHandle attempts to play local files better by basically ignoring attempts to load them in
handle_remote_updateinspirc.rsAdd an event worker thread that runs async to the main thread(s) but sync to itself to prevent potential data races for event consumers.
Get rid of (probably harmless)
.unwrap()inmain.rsEnsure that events are emited in a logical order and at logical times
Handle invalid and disappearing devices better
Ignore SpircCommands unless we're active with the exception of ShutDown
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.