Lack of interest Youtube Playlist URL ignore or support

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

SneakyDave

Well-known member
This might be considered a bug, too(?)

I would like to suggest that when entering youtube URL's that contain a list tag such as:
https://www.youtube.com/watch?v=239qXZeuE4Y&list=UUtCitcCMxSmWNkVBuQ-ydOw

That the &list tag is ignored when generating a thumbnail for the embedded video, as it doesn't seem to work correctly.

Or perhaps support the list tag somehow when entering those URL's, but I'm not sure how helpful they would be in the Media Gallery.
 
Last edited:
Upvote 1
This suggestion has been closed. Votes are no longer accepted.
This might be considered a bug, too(?)

I would like to suggest that when entering youtube URL's that contain a list tag such as:
https://www.youtube.com/watch?v=239qXZeuE4Y&list=UUtCitcCMxSmWNkVBuQ-ydOw

That the &list tag is ignored when generating a thumbnail for the embedded video, as it doesn't seem to work correctly.

Or perhaps support the list tag somehow when entering those URL's, but I'm not sure how helpful they would be in the Media Gallery.

Here here! Very inconvenient that youtube url's with a list tag get no thumbnail. At least 50% of the youtube media uploads we get have a list tag (and no thumbnail) :(
 
It works for me...

There's really no reason why it shouldn't. As long as it is a valid media site URL, which this should be:

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.

(It should embed automatically)

The only bit of information that is used to fetch the thumbnail is the video ID so if it gets a video ID, it will get a thumbnail and it works here:

upload_2015-1-12_10-40-16.webp
 
The thumbnail were gone for me to until I uninstalled s9e Media BBCodes pack and restored the default media BB codes. After that thumbnails works OK for your link.
So maybe how @JoshyPHP's addon work with YT thumbnails is different then default.
 
If that is the case, we really have no control over modifications made to the way default media sites are processed, or additional ones that are added.

I would hazard a guess, that there may be an additional media site that kicks in when there is a list parameter in the URL. XFMG will only create thumnnails for sites it explicitly knows about, otherwise custom code would need to be developed to get the thumbnail.

See Gallery Options > Media Site Options and the files in library/XenGallery/Thumbnail for examples.
 
There's really no reason why it shouldn't. As long as it is a valid media site URL, which this should be:
If @kontrabass uses my add-on, the YouTube playlist link from above will generate the following BBCode:
Code:
[MEDIA=youtube]id=239qXZeuE4Y;list=UUtCitcCMxSmWNkVBuQ-ydOw[/MEDIA]
...which I guess trips your thumbnail class. The same applies to links with a timestamp or any feature that is not supported by the default YouTube media site.
 
If @kontrabass uses my add-on, the YouTube playlist link from above will generate the following BBCode:
Code:
[MEDIA=youtube]id=239qXZeuE4Y;list=UUtCitcCMxSmWNkVBuQ-ydOw[/MEDIA]
...which I guess trips your thumbnail class. The same applies to links with a timestamp or any feature that is not supported by the default YouTube media site.

Thanks for the input. I think I'm reading this right... so in order for youtube links with a playlist to generate thumbnails in XMG, I need to restore the default XF youtube media site code?
 
The default YouTube media site does not support playlists at all so you'd be better off posting videos without the playlist (without &list=...) in your gallery.

If you don't care about playlists then you may reinstall the default YouTube definition and you won't know the difference. Ideally, it would be best to support both in the Media Gallery's thumbnail class. @Chris D If you want to support both, here's how I extract vars from the media key:
Code:
$vars = array('id' => $mediaKey);
if (preg_match('(^(\\w+=[^;]*)(?>;(?1))*$)', $mediaKey))
{
    foreach (explode(';', $mediaKey) as $pair)
    {
        list($k, $v) = explode('=', $pair);
        $vars[urldecode($k)] = urldecode($v);
    }
}
It handles both forms:
Code:
[MEDIA=youtube]239qXZeuE4Y[/MEDIA]
[MEDIA=youtube]id=239qXZeuE4Y;list=UUtCitcCMxSmWNkVBuQ-ydOw[/MEDIA]
 
It's not so much what the code is, we're fine with that. It's more a question as to whether we should support that in the core from the point of view that we obviously can't support everything that is "third party". Though I do appreciate your comments on some potential improvements from a while ago.

It'll probably be a different solution but I'll come up with something later.
 
This should help.

I stole most of your code @JoshyPHP seeing as it was already written, to save me some time, thanks for that ;)

However, we're not going to be changing anything in the core of XFMG for reasons stated, but this should work.

This file needs to be uploaded to a new directory that you will need to create:

library/XenGalleryThumbnails/YouTube.php

(so, create a directory named XenGalleryThumbnails and then upload the attached YouTube.php to that).

Then edit your Gallery Options > Media Site options. In the "Media Site Thumbnails" section, next to "YouTube" change the value to "XenGalleryThumbnails_YouTube".
 

Attachments

This should help.

I stole most of your code @JoshyPHP seeing as it was already written, to save me some time, thanks for that ;)

However, we're not going to be changing anything in the core of XFMG for reasons stated, but this should work.

This file needs to be uploaded to a new directory that you will need to create:

library/XenGalleryThumbnails/YouTube.php

(so, create a directory named XenGalleryThumbnails and then upload the attached YouTube.php to that).

Then edit your Gallery Options > Media Site options. In the "Media Site Thumbnails" section, next to "YouTube" change the value to "XenGalleryThumbnails_YouTube".

Thanks for this Chris & Josh! I created the file, modified the Media Site options as instructed, and then I rebuilt gallery thumbnails. Any YouTube video I upload, playlist tag or not, generates a thumbnail now. (y)

There's just one oddity that I can live with: even after rebuilding thumbnails and purging the CDN, some older youtube videos have no thumbnail, even without playlist tags (see http://www.talkbass.com/media/categories/solo-bass-guitar.12/?page=3). No matter what I try I can't get a thumbnail on these. Like I said, I can live with this. All new uploads seem to generate thumbnails fine. :cool:
 
Top Bottom