This commit is contained in:
Araxeus
2021-05-08 23:01:57 +03:00
parent 6b88397f82
commit d7e42471a4

View File

@ -42,9 +42,10 @@ global.download = () => {
triggerAction(CHANNEL, ACTIONS.PROGRESS, 2); // starts with indefinite progress bar
let metadata;
let videoUrl = getSongMenu()
?.querySelector('ytmusic-menu-navigation-item-renderer.iron-selected[tabindex="0"]')
?.querySelector("#navigation-endpoint")
// selector of first button which is always "Start Radio"
?.querySelector('ytmusic-menu-navigation-item-renderer.iron-selected[tabindex="0"] #navigation-endpoint')
?.getAttribute("href");
console.log(videoUrl)
if (videoUrl) {
videoUrl = baseUrl + "/" + videoUrl;
metadata = null;