2015-04-08, 12:35
(2015-04-08, 10:25)bromix Wrote:(2015-04-08, 01:34)RayW1986 Wrote: Hey Bromix, I'm just curious, is there a way to do something like the following, but for it to shuffle and play the videos uploaded by a channel/user instead of those in a playlist?
Code:plugin://plugin.video.youtube/play/?playlist_id=PLbnHnp4sVjUX25JbkSsebqJAApDaTh7Dk&order=shuffle
For example, if I wanted to do this for all the videos of DisneyJuniorUK, etc?
Thanks.
Technically it's possible (and it would work now - take the ID of the channel and replace th UC in front with UU), because the upload is also a playlist but keep in mind you will have to load the complete playlist of uploads...I tested it yesterday and in one example of 350 uploaded videos I have to make (350 / 50 = 7) requests to collect the videos (max. of 50 per page are allowed), after that I have to make for each video additional calls to gather further informations of the video (again 350 / 50 = 7).
Now take for an example this channel...this is the playlist which represents the uploads:
https://www.youtube.com/playlist?list=UU...ybxEX8ZWkA
1643 Videos * 2 / 50 = 66 requests. We could work with a limit...but the worst case will spend (based on your ISP connection and the server of youtube) some time to gather the playlist to play...but it's possible. If KODI would provide something like lazy loading or segmentation for the current playlist a callback could trigger the additional calls in the addon...but this is only in my dreams of optimizations
Thank you Bromix, that worked a charm. I am working on a couple of YouTube based plugins (basically indexes of certain subjects), I hope you don't mind that the streams call your plugin to play.
Thank's a lot.