[GH-ISSUE #974] Unable to search/play anything with a space from the CLI #431

Open
opened 2026-02-28 14:49:08 +03:00 by kerem · 4 comments
Owner

Originally created by @B1T3X on GitHub (Apr 17, 2022).
Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/974

Hi,

I'm trying to play songs from the CLI, but if the song/query has spaces in it, I get an error, it's as if spt is ignoring any quotation marks or escape characters.

An example:

spt play --name "broken imagine dragons" --track --random

Result:
error: Found argument 'imagine' which wasn't expected, or isn't valid in this context

USAGE:
    spt play <--uri <URI>|--name <NAME>> <--track|--artist|--playlist|--album|--show>

For more information try --help

Same if I try with single quotation marks or backslashes/double backslashes, it simply won't work.

Would appreciate some help because I have scoured the web and am simply unable to find anything mentioning such a problem in the issues.

OS: MacOS Monterey 12.3.1
Shell: GNU bash, version 5.1.16(1)-release (aarch64-apple-darwin21.1.0)

Thanks in advance!

Originally created by @B1T3X on GitHub (Apr 17, 2022). Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/974 Hi, I'm trying to play songs from the CLI, but if the song/query has spaces in it, I get an error, it's as if `spt` is ignoring any quotation marks or escape characters. An example: ``` spt play --name "broken imagine dragons" --track --random Result: error: Found argument 'imagine' which wasn't expected, or isn't valid in this context USAGE: spt play <--uri <URI>|--name <NAME>> <--track|--artist|--playlist|--album|--show> For more information try --help ``` Same if I try with single quotation marks or backslashes/double backslashes, it simply won't work. Would appreciate some help because I have scoured the web and am simply unable to find anything mentioning such a problem in the issues. OS: MacOS Monterey 12.3.1 Shell: GNU bash, version 5.1.16(1)-release (aarch64-apple-darwin21.1.0) Thanks in advance!
Author
Owner

@DJTai commented on GitHub (Jun 5, 2022):

@B1T3X --- If you run that command without --random, does it work? The --random flag is listed as only working with playlists (is "broken imagine dragons" the name of a Playlist you have? If so you'll want to sub --track for --playlist)

When I try to use --track --random, I get:
error: The argument '--track' cannot be used with '--random'

<!-- gh-comment-id:1146817197 --> @DJTai commented on GitHub (Jun 5, 2022): @B1T3X --- If you run that command without `--random`, does it work? The `--random` flag is listed as only working with playlists (is "broken imagine dragons" the name of a Playlist you have? If so you'll want to sub `--track` for `--playlist`) When I try to use `--track --random`, I get: `error: The argument '--track' cannot be used with '--random'`
Author
Owner

@B1T3X commented on GitHub (Jun 5, 2022):

@B1T3X --- If you run that command without --random, does it work? The --random flag is listed as only working with playlists (is "broken imagine dragons" the name of a Playlist you have? If so you'll want to sub --track for --playlist)

When I try to use --track --random, I get: error: The argument '--track' cannot be used with '--random'

It doesn't matter what flags I do or do not pass, if the --name flag has a space in its argument, it throws this error

<!-- gh-comment-id:1146854462 --> @B1T3X commented on GitHub (Jun 5, 2022): > @B1T3X --- If you run that command without `--random`, does it work? The `--random` flag is listed as only working with playlists (is "broken imagine dragons" the name of a Playlist you have? If so you'll want to sub `--track` for `--playlist`) > > When I try to use `--track --random`, I get: `error: The argument '--track' cannot be used with '--random'` It doesn't matter what flags I do or do not pass, if the `--name` flag has a space in its argument, it throws this error
Author
Owner

@aromeronavia commented on GitHub (Jun 25, 2022):

I think by design this wasn't meant to work like that @B1T3X
From what I tried, you can only play by either using --track or --artist followed by a --name argument

cargo run play --artist --name "Lost Canvas"
cargo run play --track --name "Ramito de violetas"

Using any of the previous commands work regarding of blank spaces.

<!-- gh-comment-id:1166193620 --> @aromeronavia commented on GitHub (Jun 25, 2022): I think by design this wasn't meant to work like that @B1T3X From what I tried, you can only play by either using --track or --artist followed by a --name argument ``` cargo run play --artist --name "Lost Canvas" cargo run play --track --name "Ramito de violetas" ``` Using any of the previous commands work regarding of blank spaces.
Author
Owner

@B1T3X commented on GitHub (Jun 26, 2022):

I think by design this wasn't meant to work like that @B1T3X
From what I tried, you can only play by either using --track or --artist followed by a --name argument

cargo run play --artist --name "Lost Canvas"
cargo run play --track --name "Ramito de violetas"

Using any of the previous commands work regarding of blank spaces.

Why are you running cargo run?
I tried with spt play and the issue still persists

<!-- gh-comment-id:1166461282 --> @B1T3X commented on GitHub (Jun 26, 2022): > I think by design this wasn't meant to work like that @B1T3X > From what I tried, you can only play by either using --track or --artist followed by a --name argument > > ``` > cargo run play --artist --name "Lost Canvas" > cargo run play --track --name "Ramito de violetas" > ``` > > Using any of the previous commands work regarding of blank spaces. Why are you running `cargo run`? I tried with `spt play` and the issue still persists
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-tui#431
No description provided.