Fix YouTube plugin in OpenELEC.

Leave a comment

July 22, 2014 by aubreykloppers

Problem Background:

My youtube plugin on OpenELEC (Pi) did not want to authenticate me.  The fix is a mess, but works.  Thanks to Vonpire @Xbmc for the fix:

1. open the following url to authenticate the youtube plugin with your google account:
https://accounts.google.com/o/oauth2/aut…_type=code

This will send you to a page which gives you an authentication code.

2. Create an HTML file with the following contents, and open it in a browser:
http://pastebin.com/fdH9xJF7

3. paste the code from step 1 in the code field and click submit
This should give you a result like this:
{
“access_token” : “A long cryptic phrase”,
“token_type” : “Bearer”,
“expires_in” : 3600,
“refresh_token” : “Another cryptic phrase”
}

4. open the settings.xml file in your “userdata\addon_data\plugin.video.youtube” folder
find the oauth2_access_token setting and copy the access_token phrase from step 3 to the value field
find the oauth2_refresh_token setting and copy the refresh_token phrase from step 3 to the value field
for the oauth2_expires_at setting see step 5

5. Go to http://pythonwebconsole.thomnichols.org/ and run the following script
——————————–
import time

print “time.time(): %f ” % time.time()
———————————

This will output something like:
time.time(): 1390933738.478000

add 3600 to that number, eg. 1390937338.478000

paste that number in the value field of the oauth2_expires_at setting.

6. Save the settings.xml file

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: