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
9.08k stars 514 forks source link

[Feature Request]: Allow opening URLs directly #2199

Open Bluscream opened 4 months ago

Bluscream commented 4 months ago

Preflight Checklist

Problem Description

I would like to be able to open links directly with youtube-music from commandline. Whenever i want to open a direct url, i have to open devtools and do allow pasting and window.location.href = %url% manually

Proposed Solution

ability to open urls like

"C:\Users\blusc\AppData\Local\Programs\youtube-music\YouTube Music.exe" https://music.youtube.com/watch?v=GZPRrYLGrhI&t=2s

and internally it should basically do window.location.href = %url%

Especially useful for something like Browser Tamer

Alternatives Considered

None

Additional Information

No response

ArjixWasTaken commented 2 months ago

Personally I believe that internally it should parse the url, and call the corresponding method to load the given track/album/artist using their ID

The player API should have methods for playing a track by its ID (and adding a track to the queue, etc)

Might be better to do that, since it would avoid a full-page reload

Bluscream commented 2 months ago

I'm fine with any internal implementation aslong as it achieves the end goal. My recommendation was just an example