mirror of
https://github.com/aome510/spotify-player.git
synced 2026-04-26 09:25:49 +03:00
[PR #928] feat: add 'open' CLI command for playing Spotify URIs/URLs #1866
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#1866
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/928
Author: @greqor
Created: 2/12/2026
Status: 🔄 Open
Base:
master← Head:feat/open-uri-url📝 Commits (2)
8d5c104feat: add 'open' CLI command for playing Spotify URIs/URLsa9936b5fix: inline format args for clippy📊 Changes
5 files changed (+113 additions, -29 deletions)
View changed files
📝
README.md(+1 -0)📝
spotify_player/src/cli/client.rs(+95 -29)📝
spotify_player/src/cli/commands.rs(+8 -0)📝
spotify_player/src/cli/handlers.rs(+7 -0)📝
spotify_player/src/cli/mod.rs(+2 -0)📄 Description
Resolves #887
What
Adds a new
spotify_player open <URI_OR_URL>CLI command that starts playback of a Spotify item directly from the command line.Both Spotify URIs and web URLs are accepted:
Supported item types: tracks, albums, artists, playlists.
How it works
/track/ID→spotify:track:ID).TrackId,AlbumId,ArtistId, andPlaylistIdparsers to build the appropriatePlayerRequest::StartPlayback.playbackcommand - async when a TUI instance is running, synchronous otherwise.Refactoring
The async/sync player request logic that was previously inlined in
handle_playback_requesthas been extracted into a sharedexecute_player_request()helper. Bothplaybackandopencommands now delegate to it, removing duplication.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.