Skip to content

Commit

Permalink
Fix channel normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelRobitaille committed Nov 13, 2024
1 parent 0be0a55 commit 962c1d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const loadConfig = async (
}

// If it's the custom channel URL, try to get the ID from the API
if (/^https:\/\/www.youtube.com\/(?:c|channel)\/.*/.test(channel)) {
if (/^https:\/\/www.youtube.com\/(?:c\/|channel\/|)[^\/]*/.test(channel)) {
logger.verbose('String matches URL with channel name')
return await Promise.any([
getChannelIdFromUrlAPI(service, auth, channel),
Expand Down

0 comments on commit 962c1d7

Please sign in to comment.