[PR #194] [MERGED] Extend CLI functionalities #1595

Closed
opened 2026-03-14 15:22:27 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/aome510/spotify-player/pull/194
Author: @aome510
Created: 5/8/2023
Status: Merged
Merged: 5/10/2023
Merged by: @aome510

Base: masterHead: extend-cli-func


📝 Commits (10+)

  • de74677 add --offset to playback volume command
  • f1b67ac add add_context_args helper function
  • ce47547 rename cli::socket to cli::client
  • ba68788 updated handlers for commands involving context to use new Context struct
  • 158dc81 updated handling code for GetContext command
  • f5718fa handle bad request with get command
  • a28ba04 updated handling codes for Command::Start
  • e0dfb83 rename ContextId to IdOrName to re-use the struct
  • 64ef5b1 add connect subcommand and its handler
  • 5aee65c implement cli command to start liked tracks playback

📊 Changes

7 files changed (+598 additions, -268 deletions)

View changed files

spotify_player/src/cli/client.rs (+398 -0)
📝 spotify_player/src/cli/commands.rs (+72 -14)
📝 spotify_player/src/cli/handlers.rs (+71 -17)
📝 spotify_player/src/cli/mod.rs (+54 -6)
spotify_player/src/cli/socket.rs (+0 -229)
📝 spotify_player/src/client/mod.rs (+2 -2)
📝 spotify_player/src/main.rs (+1 -0)

📄 Description

Resolves #184

Changes

  • added more subcommands for playback start command: playback start context|liked|radio
  • added support for specifying either id or name for a Spotify item as a command's argument
  • added new commands:
    • playback like
    • connect
  • sent error messages back to socket handling get commands upon errors
  • updated playback volume command to support increasing/decreasing volume by an offset

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/aome510/spotify-player/pull/194 **Author:** [@aome510](https://github.com/aome510) **Created:** 5/8/2023 **Status:** ✅ Merged **Merged:** 5/10/2023 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `master` ← **Head:** `extend-cli-func` --- ### 📝 Commits (10+) - [`de74677`](https://github.com/aome510/spotify-player/commit/de74677adba87bc90d9d5a7041d620ac011bd420) add `--offset` to `playback volume` command - [`f1b67ac`](https://github.com/aome510/spotify-player/commit/f1b67acea78a98f32a9d660ba4da2f656b337145) add `add_context_args` helper function - [`ce47547`](https://github.com/aome510/spotify-player/commit/ce4754744e06f7291a2438e73cf9945e4df42ba8) rename `cli::socket` to `cli::client` - [`ba68788`](https://github.com/aome510/spotify-player/commit/ba68788a9994a4ad0026b0d70ff5dd8d4cc719ab) updated handlers for commands involving context to use new `Context` struct - [`158dc81`](https://github.com/aome510/spotify-player/commit/158dc8179b774e49ddfae5a8b8b19f48c2ff635c) updated handling code for `GetContext` command - [`f5718fa`](https://github.com/aome510/spotify-player/commit/f5718fae238f895c8d0ec32d4bbb57c77a3dbf00) handle bad request with get command - [`a28ba04`](https://github.com/aome510/spotify-player/commit/a28ba047bb3d44c3f9dc325461166c3336c5cfb2) updated handling codes for `Command::Start` - [`e0dfb83`](https://github.com/aome510/spotify-player/commit/e0dfb832500a35e398f05b8c01ff7e34b05f235b) rename `ContextId` to `IdOrName` to re-use the struct - [`64ef5b1`](https://github.com/aome510/spotify-player/commit/64ef5b10a005d5b62846530287eec462613f6408) add `connect` subcommand and its handler - [`5aee65c`](https://github.com/aome510/spotify-player/commit/5aee65c95b9eeebb01b3b4e6f2241c06513c1c68) implement cli command to start liked tracks playback ### 📊 Changes **7 files changed** (+598 additions, -268 deletions) <details> <summary>View changed files</summary> ➕ `spotify_player/src/cli/client.rs` (+398 -0) 📝 `spotify_player/src/cli/commands.rs` (+72 -14) 📝 `spotify_player/src/cli/handlers.rs` (+71 -17) 📝 `spotify_player/src/cli/mod.rs` (+54 -6) ➖ `spotify_player/src/cli/socket.rs` (+0 -229) 📝 `spotify_player/src/client/mod.rs` (+2 -2) 📝 `spotify_player/src/main.rs` (+1 -0) </details> ### 📄 Description Resolves #184 ## Changes - added more subcommands for `playback start` command: `playback start context|liked|radio` - added support for specifying either `id` or `name` for a Spotify item as a command's argument - added new commands: + `playback like` + `connect` - sent error messages back to socket handling `get` commands upon errors - updated `playback volume` command to support increasing/decreasing volume by an offset --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 15:22:27 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#1595
No description provided.