th-ch / youtube-music

YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)
https://th-ch.github.io/youtube-music/
MIT License
7.78k stars 470 forks source link

[Feature Request]: commands on cli #1581

Open Nombiembre opened 8 months ago

Nombiembre commented 8 months ago

Preflight Checklist

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

Alternatives Considered

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

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.

ArjixWasTaken commented 8 months ago

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

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

Nombiembre commented 8 months ago

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.

ArjixWasTaken commented 8 months ago

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 commented 8 months ago

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

Nombiembre commented 8 months ago

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)

ArjixWasTaken commented 8 months ago

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

Nombiembre commented 8 months ago

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.

ArjixWasTaken commented 8 months ago

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

Nombiembre commented 8 months ago

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