FAQ  •  Register  •  Login

YouTube

<<

stefana888

User avatar

DLNA master

Posts: 134

Joined: Mon Aug 18, 2014 6:24 am

Post Sat Apr 25, 2015 8:47 pm

Re: YouTube

Suggested plugin code for YouTube Data API V3:

viewtopic.php?f=22&t=18778
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Apr 26, 2015 1:49 pm

Re: YouTube

Updated the plugin to work as a WebResource plugin. Example URLs in the original post.
<<

Tarrasque

Streaming enthusiast

Posts: 23

Joined: Fri Jan 06, 2012 10:55 pm

Post Sun Apr 26, 2015 11:06 pm

Re: YouTube

Thanks for that.

One question, I normally just use the youtube channels 'upload' category, but it looks like those pages do not have a playlistID. Is it a case of well that sucks, have to add each channels playlist to serviio now?
<<

stefana888

User avatar

DLNA master

Posts: 134

Joined: Mon Aug 18, 2014 6:24 am

Post Mon Apr 27, 2015 4:00 am

Re: YouTube

Tarrasque wrote:Thanks for that.

One question, I normally just use the youtube channels 'upload' category, but it looks like those pages do not have a playlistID. Is it a case of well that sucks, have to add each channels playlist to serviio now?

Yes. The only way I know right now to get channel uploads playlist ID is to use the Google API Exlorer for YouTube and request 'channels.list'. Here is a video that covers the subject https://m.youtube.com/watch?v=RjUlmco7v2M
Last edited by stefana888 on Mon Apr 27, 2015 7:31 am, edited 1 time in total.
<<

Tarrasque

Streaming enthusiast

Posts: 23

Joined: Fri Jan 06, 2012 10:55 pm

Post Mon Apr 27, 2015 5:09 am

Re: YouTube

Thanks.

For those who want to know, goto

https://developers.google.com/apis-expl ... nnels.list

part = contentDetails
forUsername = (channelusername)

Hit execute, and in the results at bottom of the page, look for "uploads":
<<

norm

Serviio lover

Posts: 72

Joined: Tue Apr 09, 2013 3:18 pm

Post Sun May 03, 2015 8:43 am

Re: YouTube

Thanks All! Works for me. Allows me to keep up with my youtube feeds easily and now with v3 api :D
<<

MarkusW

Serviio newbie

Posts: 9

Joined: Thu Jul 03, 2014 9:09 pm

Post Sun May 03, 2015 3:52 pm

Re: YouTube

With the v2 API, it was possible, to set the start-index of the playlist.
This was useful, when one wanted to have more results than 50, because then one could create a second Online resource in serviio, which was beginning at 51.

E.g.: (v2 API)
  Code:
http://gdata.youtube.com/feeds/api/playlists/6D4C31FFA7EBABB5?start-index=51&max-results=50


Can this be done with the new Plugin/API ?
<<

stefana888

User avatar

DLNA master

Posts: 134

Joined: Mon Aug 18, 2014 6:24 am

Post Sun May 03, 2015 9:12 pm

Re: YouTube

MarkusW wrote:With the v2 API, it was possible, to set the start-index of the playlist.
Can this be done with the new Plugin/API?
The V3 API uses a 'pageToken' attribute instead which can be appended to the url (&pageToken={TOKEN}). One must use the API explorer to get its value. https://developers.google.com/apis-expl ... lists.list

Attributes:

part=snippet
maxResults={MAX_RESULTS}
(pageToken={TOKEN})
playlistId={PLAYLIST_ID}

Hit 'execute' and look up in the result for 'nextPageToken' value. Use the value as pageToken={TOKEN} for getting a certain page (and new tokens).

Clear enought?

Edit:
  Code:
https://www.googleapis.com/youtube/v3/playlistItems?playlistId={PLAYLIST_ID}&pageToken={TOKEN}
Last edited by stefana888 on Sun Jun 14, 2015 7:41 am, edited 5 times in total.
<<

Cartman316

Serviio newbie

Posts: 3

Joined: Thu May 07, 2015 1:52 pm

Post Thu May 07, 2015 1:55 pm

Re: YouTube

Thank you.

Could you please make an example for the Channel "NFL" with maximum 20 videos?
<<

stefana888

User avatar

DLNA master

Posts: 134

Joined: Mon Aug 18, 2014 6:24 am

Post Thu May 07, 2015 4:08 pm

Re: YouTube

Cartman316 wrote:Thank you.

Could you please make an example for the Channel "NFL" with maximum 20 videos?


Execute (NFL) for the uploads id

https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.channels.list?part=contentDetails&forUsername=NFL

uploads: UUDVYQ4Zhbm3S2dlz7P1GBDg into playlistId

Execute (20) and repeat for all wanted pages

https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.playlistItems.list?part=snippet&maxResults=20&playlistId=UUDVYQ4Zhbm3S2dlz7P1GBDg

nextPageToken: CAUQAA into pageToken
<<

Cartman316

Serviio newbie

Posts: 3

Joined: Thu May 07, 2015 1:52 pm

Post Fri May 08, 2015 3:25 pm

Re: YouTube

Thank you, but im not able to get a valid string.
Could you please post the string with the example (Channel=NFL, number results =20)?
<<

stefana888

User avatar

DLNA master

Posts: 134

Joined: Mon Aug 18, 2014 6:24 am

Post Fri May 08, 2015 4:23 pm

Re: YouTube

Follow the example in this thread post #1 with the uploads playlist id. Note that max items is set in Serviio's console and if you want the first page items then no pagetoken attribute should be added.
Last edited by stefana888 on Sat May 09, 2015 5:44 am, edited 1 time in total.
<<

keith.ambrose

Serviio newbie

Posts: 3

Joined: Fri May 08, 2015 9:24 pm

Post Fri May 08, 2015 9:37 pm

Re: YouTube

I'm attempting to follow the posted examples and not having much luck.

I went to the https://developers.google.com/apis-expl ... nnels.list to get the id I needed, then use the URL

https://www.googleapis.com/youtube/v3/playlistItems?playlistId=UUOzpgwSVhD9VLZrOvume4YA


in Serviio.

The log shows returned status code '400'

2015-05-08 17:25:02,934 WARN [FeedUpdaterWorker] An error occured while parsing the online resource https://www.googleapis.com/youtube/v3/p ... ZrOvume4YA, waiting for expiry time to try again: Error during feed reading. Message: URL 'https://www.googleapis.com/youtube/v3/playlistItems?playlistId=UUOzpgwSVhD9VLZrOvume4YA' returned status code '400'
org.serviio.library.online.metadata.OnlineResourceParseException: Error during feed reading. Message: URL 'https://www.googleapis.com/youtube/v3/playlistItems?playlistId=UUOzpgwSVhD9VLZrOvume4YA' returned status code '400'
at org.serviio.library.online.feed.FeedParser.parse(FeedParser.java:108)
...

Any advice would be appreciated.

Thanks,
Keith
<<

keith.ambrose

Serviio newbie

Posts: 3

Joined: Fri May 08, 2015 9:24 pm

Post Sat May 09, 2015 4:42 am

Re: YouTube

Okay, after a computer restart, I'm no longer seeing the status code '400' message, but the folder doesn't show up under Online sources on my TV anymore.

Keith
<<

stefana888

User avatar

DLNA master

Posts: 134

Joined: Mon Aug 18, 2014 6:24 am

Post Sat May 09, 2015 5:43 am

Re: YouTube

Did you set plugin type as 'Web resource' in console?
<<

keith.ambrose

Serviio newbie

Posts: 3

Joined: Fri May 08, 2015 9:24 pm

Post Sat May 09, 2015 11:00 pm

Re: YouTube

No I hadn't. That solved it, thanks!

Keith
<<

railfrog

Streaming enthusiast

Posts: 31

Joined: Tue Jul 17, 2012 4:35 pm

Post Sun May 10, 2015 10:28 am

Re: YouTube

Hi All

Sorry to be a complete noob at this sort of thing but can someone please tell me where I am going wrong.

I have copied the youtube.groovy in to the plug-in folder on Serviio
I have listed it as a web resource under source type, and copied the following URL in to the the source URL box
https://www.googleapis.com/youtube/v3/v ... ostPopular
display name is YouTube.
The online category is enabled on the presentation tab under the video category.

when I open Serviio on my TV, the online folder is there but it is empty.
I have stopped and restarted Serviio numerous times, hit refresh and still nothing.

My setup:
Serviio is installed on a HP proliant microserver running Windows server 2008 R2
DLNA device is a LG HB405SU BD Player
Both the above go through a GiG switch.
The BD Player is then connected to a TV via HDMI

I have no problem playing movies and music from Serviio, but cannot access anything online.
I have tried different plug-ins ( Vimeo,xVideos) with corresponding source URL's and nothing seems to work.

Please help :?:
<<

stefana888

User avatar

DLNA master

Posts: 134

Joined: Mon Aug 18, 2014 6:24 am

Post Sun May 10, 2015 11:15 am

Re: YouTube

If getting the plugins from the A.P.P. collection it might not work since many are outdated.
<<

railfrog

Streaming enthusiast

Posts: 31

Joined: Tue Jul 17, 2012 4:35 pm

Post Sun May 10, 2015 11:20 am

Re: YouTube

stefana888 wrote:If getting the plugins from the A.P.P. collection it might not work since many are outdated.


Thanks for the answer

I used the YouTube plug-in from the beginning of this post
<<

stefana888

User avatar

DLNA master

Posts: 134

Joined: Mon Aug 18, 2014 6:24 am

Post Sun May 10, 2015 2:58 pm

Re: YouTube

Check the logfile what is going on.
PreviousNext

Return to Available plugins

Who is online

Users browsing this forum: No registered users and 24 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.