youtube-music icon indicating copy to clipboard operation
youtube-music copied to clipboard

[Feature Request]: commands on cli

Open Nombiembre opened this issue 1 year ago • 9 comments

Preflight Checklist

  • [X] I use the latest version of YouTube Music (Application).
  • [X] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Problem Description

Lack of ability to play music in the CLI; For users who frequently utilize the terminal and want to play music quickly and directly, using the app can be somewhat tedious

Proposed Solution

In the case of playing music quickly and directly, it would be more efficient to do so from the terminal. For creating playlists or managing a longer queue, using the app would be more suitable.

I would recommend something similar to #1270, but with just one command for simplicity.

ytm -q "Beatpella Ticking" - that would search and queue the closest match

  • The app remains active in the background (the CLI serves as a controller)

Alternatives Considered

Something more sophisticated like ani-cli, which features a built-in anime search menu: https://github.com/pystardust/ani-cli

  • The app remains active in the background (the CLI serves as a controller).

Additional Information

I found #1270; however, the focus of the problem is different (he talks about api's). My proposal, to simply add a single command, would be much simpler to implement.

Nombiembre avatar Jan 02 '24 05:01 Nombiembre

Hmm, if you want complete terminal support, wouldn't it be better to use a tui?

Like: https://github.com/sudipghimire533/ytui-music

ArjixWasTaken avatar Jan 02 '24 05:01 ArjixWasTaken

Hmm, if you want complete terminal support, wouldn't it be better to use a tui?

https://github.com/sudipghimire533/ytui-music

The youtube-music app is still superior, and I use it frequently. However, sometimes when I only need to add one or two songs, it would be more convenient in the terminal, also ytui relies on yt-dlp, which means I would be listening to music from a different player.

Nombiembre avatar Jan 02 '24 05:01 Nombiembre

In that case, would it make sense if you supplied the ID of the song instead?

Like, piping it from yt-dlp or smth

(Just trying to find a reasonable and maintenance-free middle-ground)

ArjixWasTaken avatar Jan 02 '24 05:01 ArjixWasTaken

It just feels out-of-scope.

Especially with the API PR. With the API one could write a wrapper in bash for example.

ofc that is still ongoing

ArjixWasTaken avatar Jan 02 '24 05:01 ArjixWasTaken

I don't know which method would be better to use, i think the important aspect is to ensure that the music continues playing through the youtube-music app and not another player.

(I'm not very advanced in this subjec)

Nombiembre avatar Jan 02 '24 05:01 Nombiembre

yt-dlp is not a player, it is a downloader, it also can do stuff like search YouTube and give you the video id

ArjixWasTaken avatar Jan 02 '24 05:01 ArjixWasTaken

yt-dlp is not a player, it is a downloader, it also can do stuff like search YouTube and give you the video id

oooh didn't knew that, so yes, i think that would be the best method

Especially with the API PR. With the API one could write a wrapper in bash for example.

didn't knew that too, so i could make a function to call the api and queue a song from the script? edit: maybe that is too advanced for me haha.

Nombiembre avatar Jan 02 '24 06:01 Nombiembre

didn't knew that too, so i could make a function to call the api and queue a song from the script?

If the API is developed to support that, then yes.

It is still an ongoing PR

See #1151

ArjixWasTaken avatar Jan 02 '24 06:01 ArjixWasTaken

welp, thank you for your time, i hope it gets added in the future!

Nombiembre avatar Jan 02 '24 06:01 Nombiembre