fix(downloader): correct logic for YouTube Premium detection #2984
No reviewers
Labels
No labels
awaiting-reply
breaking changes
bug
cannot-reproduce
dependencies
documentation
duplicate
electron-issue
enhancement
fix-available
good first issue
help wanted
invalid
javascript
need more information
need rebase
official-youtube-music-issue
plugin request
question
release
security
stale
Status: blocked
typo
wontfix
ytmd-issue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: YTMD/youtube-music#2984
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/downloader-premium-checker"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Another fix to address 304 errors when downloading (#2888).
@ -59,3 +59,3 @@
win.webContents.executeJavaScript(
'!document.querySelector(\'#endpoint[href="/music_premium"]\')',
'!!document.querySelector(\'#endpoint[href="/music_premium"]\')',
) as Promise<boolean>;
Invalid fix. If the user is using YouTube Premium, the result of
document.querySelector('#endpoint[href="/music_premium"]')
is null.so
!document.querySelector('#endpoint[href="/music_premium"]')
is true if using YT Premium.@ -59,3 +59,3 @@
win.webContents.executeJavaScript(
'!document.querySelector(\'#endpoint[href="/music_premium"]\')',
'!!document.querySelector(\'#endpoint[href="/music_premium"]\')',
) as Promise<boolean>;
I do not have YouTube Premium, but it returns null.
My bad, it seems that this is actually caused by another bug, I'll open an issue instead.
Pull request closed