- Issue created by @maskedjellybean
- Merge request !68Issue #3513506 by maskedjellybean, mably: Allow YouTube playlist URLs in pattern "/playlist?list=" β (Merged) created by maskedjellybean
- πΊπΈUnited States maskedjellybean Portland, OR
Created a merge request with correct regex. Both "/watch?" and "/playlist?" should work.
I'm not sure that we actually need this part of the regex:
(?=.*v=(?<video_id>[0-9A-Za-z_-]*))
, so I made it optional. It seems like this would only be relevant for a URL to a single video. - π«π·France mably
Here is what Claude gives me:
Playlist URLs:
https://youtube.com/playlist?list=PLAYLIST_ID
https://youtube.com/watch?v=VIDEO_ID&list=PLAYLIST_ID
(specific video in playlist)
https://www.youtube.com/watch?v=VIDEO_ID&list=PLAYLIST_ID&index=3
(specific position in playlist) - πΊπΈUnited States maskedjellybean Portland, OR
Ok, updated the MR.
We can support index I think. Might as well add support for all the currently unsupported URL patterns in this issue. Also we were regexing for v (VIDEO_ID) and doing nothing with it, so I tried to address that.
From what I've seen, URLs in those 3 patterns now work, however I see no change in the first video played no matter what. My assumption is that in
\Drupal\video_embed_field\Plugin\video_embed_field\Provider\YouTubePlaylist::renderEmbedCode
we should set$embed_code['#query']['v']
and$embed_code['#query']['index']
. At the very least doing this does not cause any issues loading the playlist. - π«π·France mably
Thanks for the update but sadly some unit tests seem to be failing now.
-
mably β
committed 53f5456f on 3.0.x authored by
maskedjellybean β
Issue #3513506 by maskedjellybean, mably: Allow YouTube playlist URLs in...
-
mably β
committed 53f5456f on 3.0.x authored by
maskedjellybean β
Automatically closed - issue fixed for 2 weeks with no activity.