Add support for music.youtube.com URLs

Closes #355
This commit is contained in:
Max Isom 2021-09-22 15:53:04 -04:00
parent 4a7108232a
commit abb02912c8
No known key found for this signature in database
GPG key ID: 25C9B1A7F6798880

View file

@ -76,7 +76,13 @@ export default class implements Command {
try { try {
const url = new URL(args[0]); const url = new URL(args[0]);
const YOUTUBE_HOSTS = ['www.youtube.com', 'youtu.be', 'youtube.com']; const YOUTUBE_HOSTS = [
'www.youtube.com',
'youtu.be',
'youtube.com',
'music.youtube.com',
'www.music.youtube.com',
];
if (YOUTUBE_HOSTS.includes(url.host)) { if (YOUTUBE_HOSTS.includes(url.host)) {
// YouTube source // YouTube source