-
Notifications
You must be signed in to change notification settings - Fork 822
Add MPRIS support #1596
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
Open
paulfariello
wants to merge
31
commits into
librespot-org:dev
Choose a base branch
from
paulfariello:mpris
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add MPRIS support #1596
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
8fe221e
Allow cloning SPIRC
wisp3rwind d7951f1
add release date to AudioItem
wisp3rwind ae47002
add Spirc.seek_offset command
wisp3rwind 8b78253
add initial MPRIS support using zbus
wisp3rwind 89f26cd
feat(mpris): serve identity based on configured name
paulfariello e49c287
feat(mpris): Add set_volume handler
paulfariello c54b260
feat(mpris): Retry with pid specific name on NameTaken error
paulfariello 019fa4c
feat(player): Send current state of player for all new player listeners
paulfariello 4a26063
feat(mpris): Notify when volume changed
paulfariello fc17df4
fix(mpris): Remove done todo
paulfariello 930e611
fix(mpris): Remove duplicated and commented function
paulfariello a7d90e9
fix(mpris): Add comment concerning non-support of setting playback rate
paulfariello 05085b9
feat(mpris): Store metadata unserialized
paulfariello 6b2d3c8
feat(mpris): Add debug logging
paulfariello 48224fa
feat(mpris): Send biggest art url
paulfariello 077f9ef
feat(mpris): Update track id on EndOfTrack
paulfariello 18339b2
feat(player): Add position update option
paulfariello 9d0b399
feat(mpris): Get position from player and provide it to MPRIS
paulfariello 82f4a5e
feat(mpris): Check track_id when setting position
paulfariello 2d199a3
chore(mpris): Remove useless comment
paulfariello 23659f9
feat(mpris): Add support for desktop entry
paulfariello f4f330f
feat(mpris): Return error when trying to play/pause in wrong context
paulfariello 90e64b2
feat(mpris): Signal when position changed
paulfariello 867f537
chore(mpris): alias zbus::fdo::{Error, Result} for readability
paulfariello 16d1c0f
feat(player): Allow for stopped event without track_id
paulfariello f8d6c42
feat(player): Rename position update interval option
paulfariello 721375d
feat(mpris): Upgrade to zbus 5
paulfariello 829ce15
feat(player): Add position_ms in Loading event
paulfariello 3aaa31c
feat(changelog): Add mpris changelog
paulfariello 6ca0583
fixup! add initial MPRIS support using zbus
paulfariello 70c68f7
feat(player): Replace position update interval option with sensible d…
paulfariello File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,7 +36,7 @@ repository = "https://github.com/librespot-org/librespot" | |
| edition = "2024" | ||
|
|
||
| [features] | ||
| default = ["native-tls", "rodio-backend", "with-libmdns"] | ||
| default = ["native-tls", "rodio-backend", "with-libmdns", "with-mpris"] | ||
|
|
||
| # TLS backends (mutually exclusive - compile-time checks in oauth/src/lib.rs) | ||
| # Note: Feature validation is in oauth crate since it's compiled first in the dependency tree. | ||
|
|
@@ -132,6 +132,10 @@ with-dns-sd = ["librespot-discovery/with-dns-sd"] | |
| # data. | ||
| passthrough-decoder = ["librespot-playback/passthrough-decoder"] | ||
|
|
||
| # MPRIS: Allow external tool to have access to playback | ||
| # status, metadata and to control the player. | ||
| with-mpris = ["dep:zbus", "dep:zvariant", "dep:time"] | ||
|
|
||
| [lib] | ||
| name = "librespot" | ||
| path = "src/lib.rs" | ||
|
|
@@ -180,7 +184,10 @@ tokio = { version = "1", features = [ | |
| "sync", | ||
| "process", | ||
| ] } | ||
| time = { version = "0.3", features = ["formatting"], optional = true } | ||
| url = "2.2" | ||
| zbus = { version = "5", default-features = false, features = ["tokio"], optional = true } | ||
| zvariant = { version = "5", default-features = false, optional = true } | ||
|
|
||
| [package.metadata.deb] | ||
| maintainer = "Librespot Organization <[email protected]>" | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please tag in the changelog that this is a breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done