[RELEASE] YouTube (Video) Plugin - De facto default standard YouTube Addon for XBMC

  Thread Rating:
  • 14 Votes - 4.64 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
vijayk416 Offline
Senior Member
Posts: 191
Joined: Apr 2011
Reputation: 1
Post: #1811
jammu Wrote:You can fix this manually to OpenElec.
Code:
Just ssh to your box (login: openelec/openelec) and do:
su root (default pwd: openelec)
cd ~/.xbmc/addons/plugin.video.youtube
vi YouTubePlayer.py
Thank you Jammu, that did it. For the record, I had to do the second half of the fix i.e.

< data = re.findall('="(ttsurl=.*?)"', data)
---
> data = re.findall('flashvars="(.*?)"', data)
find quote
TobiasTheCommie Offline
Skilled Python Coder
Posts: 621
Joined: Apr 2008
Reputation: 3
Post: #1812
vijayk416 Wrote:Thank you Jammu, that did it. For the record, I had to do the second half of the fix i.e.

< data = re.findall('="(ttsurl=.*?)"', data)
---
> data = re.findall('flashvars="(.*?)"', data)

This fix seems wrong.

The ttsurl is the "Transcripts" url. I mean sure, it may work for you. But it really isn't doing what it is supposed to do.
find quote
user137 Offline
Junior Member
Posts: 11
Joined: Dec 2011
Reputation: 0
Question    Post: #1813
Hello,

Win7-64bit, Dharma 10.1 as well as Eden Beta2
Youtube plays fine in browser both IE and Chrome.

Fresh install of XBMC, then Add add-on Youtube (2.1.3), but nothing plays via the addon Sad

Quote:18:54:04 T:3256 NOTICE: -->Python Interpreter Initialized<--
18:54:04 T:3256 NOTICE: YouTube-2.1.3
18:54:06 T:2500 NOTICE: -->Python Interpreter Initialized<--
18:54:06 T:2500 NOTICE: YouTube-2.1.3
18:54:08 T:4932 NOTICE: -->Python Interpreter Initialized<--
18:54:08 T:4932 NOTICE: YouTube-2.1.3
18:54:11 T:4372 NOTICE: -->Python Interpreter Initialized<--
18:54:12 T:4372 NOTICE: YouTube-2.1.3
18:54:13 T:4372 ERROR: Error Type: <type 'exceptions.AttributeError'>
18:54:13 T:4372 ERROR: Error Contents: YouTubePlayer instance has no attribute 'showMessage'
18:54:13 T:4372 ERROR: Traceback (most recent call last):
File "C:\Users\MC\AppData\Roaming\XBMC\addons\plugin.video.youtube\default.py", line 52, in <module>
navigator.executeAction(params)
File "C:\Users\MC\AppData\Roaming\XBMC\addons\plugin.video.youtube\YouTubeNavigation.p​y", line 205, in executeAction
player.playVideo(params)
File "C:\Users\MC\AppData\Roaming\XBMC\addons\plugin.video.youtube\YouTubePlayer.py", line 57, in playVideo
self.showErrorMessage(self.__language__(30603), video["apierror"], status)
File "C:\Users\MC\AppData\Roaming\XBMC\addons\plugin.video.youtube\YouTubePlayer.py", line 365, in showErrorMessage
self.showMessage(title, result)
AttributeError: YouTubePlayer instance has no attribute 'showMessage'
18:54:13 T:4288 ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.youtube/?path=/root/search&action=play_video&videoid=OKRJfIPiJGY]
(This post was last modified: 2012-01-24 20:51 by user137.)
find quote
heraldo Offline
Junior Member
Posts: 6
Joined: Jan 2011
Reputation: 0
Post: #1814
fix confirmed working! You can use nano instead of vi, makes it a little easier for non-pinguins out there
find quote
cami Offline
Senior Member
Posts: 111
Joined: Aug 2007
Reputation: 0
Post: #1815
still not loading subscriptions, playlists etc, trailers not working for me.

i guess i just need to wait till Eden comes out
find quote
onamattuphere Offline
Junior Member
Posts: 5
Joined: Mar 2011
Reputation: 0
Post: #1816
FRWH Wrote:For some reason the fix didn't work for me, so if it's useful for anybody, here's my fix:

Open YouTubePlayer.py and look for this code (like the original fix):

Code:
                data = result
                data = data[data.find('flashvars'):].replace("\n", "").replace("&amp;", "&")
                data = re.findall('="(ttsurl=.*?)"', data)
                if len(data) > 0:
                    player_object = self._convertFlashVars(data[0])

Replace the line
Code:
data = re.findall('="(ttsurl=.*?)"', data)
with
Code:
data = data[11:data.find('"', 12)]

And the line
Code:
player_object = self._convertFlashVars(data[0])
with
Code:
player_object = self._convertFlashVars(data)
(just remove the "[0]" at the end).

Take care with the indentation!



I just wanted to thank you for the fix.

Nice python fu!!
find quote
vijayk416 Offline
Senior Member
Posts: 191
Joined: Apr 2011
Reputation: 1
Post: #1817
TobiasTheCommie Wrote:This fix seems wrong.

The ttsurl is the "Transcripts" url. I mean sure, it may work for you. But it really isn't doing what it is supposed to do.
Hey, I'm no coder, but the first fix did nothing so I did as per the post and put in the second change. Perhaps I read it wrong but the plugin is working now. As per my original request, I would have preferred that this be fixed by a repo push but that did not happen in time. I waste too much time as it is patching this stupid system. All I want to do is watch some videos. Everyone preaches how great XBMC is, but after pulling my hair out for over a year with messes like this, all I can say is that this system is not stable enough to last a week without needing some kind of patch, and in my opinion, that is really quite irritating. I need to go to sleep for a decade so that when I wake up the HTPC experience is more thrilling than aggravating. </rant not directed at Tobias> Frown
find quote
BazATV Offline
Junior Member
Posts: 1
Joined: Feb 2011
Reputation: 0
Post: #1818
Hi, First off great plugin but i have an issue, it seems that i can't use the search function without my keyboard?
i tried using an MCE remote, ipad/iphone different remote apps and ipad with webinterface(wtouch) but the only way i can enter search criteria is with my "real" keyboard connected to my HTPC. the cursor is "stuck" in the enter box...

Use Win7 32b, Eden Beta 2, Aeon skin and Youtube 2.8 Addon

Regards
Benny
(This post was last modified: 2012-01-25 18:24 by BazATV.)
find quote
VelvetKevorkian Offline
Senior Member
Posts: 189
Joined: May 2006
Reputation: 0
Location: Germany
Post: #1819
HenrikDK Wrote:This is the same problem Vultures was having, we have an advanced setting that makes the plugin default to icons view for video lists, it should be possible to disable it in the advanced settings part of the plugin, but if that doesn't work try to delete the lines with:

Code:
        if (video_view):
            xbmc.executebuiltin("Container.SetViewMode(500)")
In YouTubeNavigation.py (should only be 2 places), that should disable anything the plugin does with view modes. Smile

i was having the same problem, changing the view type to "xbmc default" did the trick for me, thx!
find quote
Midnight Tboy Offline
Junior Member
Posts: 39
Joined: Dec 2011
Reputation: 0
Post: #1820
Hi all,

I'm in Windows 7 64bit, a clean OS install of Eden beta 2. I've just imported my movie info etc, and at first a trailer played fine, then I get a playback failed message, nearly every time.

Googled for answers but can't see any. Searched for the lines of text suggested in the last couple of pages in my YouTubePlayer.py file, but them lines don't exist to be changed in the first place

Any ideas?

If I browse on the youtube plugin to random sections like top free movies, then sometimes it will play, mostly they wont

once go into the youtube app, theres a lot of data in the log, but trying to get the relevant info I get this

Quote:http://www.youtube.com/watch?v=wyx6JDQCs...earch=none', 'location': 'http://www.youtube.com/watch?v=wyx6JDQCslE&safeSearch=none', 'header': 'Cache-Control: no-cache\r\nContent-Type: text/html; charset=utf-8\r\nDate: Thu, 26 Jan 2012 03:02:22 GMT\r\nExpires: Tue, 27 Apr 1971 19:44:06 EST\r\nP3p: CP="This is not a P3P policy! See http://www.google.com/support/accounts/b...wer=151657 for more info."\r\nServer: wiseguy/0.6.11\r\nSet-Cookie: use_hitbox=72c46ff6cbcdb7c5585c36411b6b334edAEAAAAw; path=/; domain=.youtube.com\r\nSet-Cookie: VISITOR_INFO1_LIVE=Nk29_P8OyJE; path=/; domain=.youtube.com; expires=Sat, 22-Sep-2012 03:02:21 GMT\r\nSet-Cookie: recently_watched_video_id_list=ca99425fa700191d0ad4c0f6e3eb679eWwEAAABzCwAAAHd5e​DZKRFFDc2xF; path=/; domain=.youtube.com\r\nX-Content-Type-Options: nosniff\r\nX-Frame-Options: SAMEORIGIN\r\nConnection: close\r\n'}'
03:02:18 T:1860 NOTICE: [YouTube-2.8.0] playVideo : 'construct video url failed contents of video item {'Plot': 'Date Uploaded: 2011-09-16 07:00:00, View count: 195722578\nMusic video by LMFAO performing Sexy and I Know It. Get it on iTunes: http://glnk.it/dt \xc2\xa9 2011 Interscope Records', 'Duration': '03:24', 'Title': 'LMFAO - Sexy and I Know It', 'apierror': False, 'Date': '16-09-2011', 'user': 'LMFAOVEVO', 'count': 195722578, 'Rating': 4.6283260000000004, 'playlist_entry_id': u'wyx6JDQCslE', 'videoid': u'wyx6JDQCslE', 'Studio': 'LMFAOVEVO', 'Genre': 'Music', 'thumbnail': u'http://i.ytimg.com/vi/wyx6JDQCslE/0.jpg'}'
03:02:18 T:3196 ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid=wyx6JDQCslE]
03:02:22 T:4468 NOTICE: -->Python Interpreter Initialized<--
03:02:22 T:4468 NOTICE: YouTube-2.8.0
03:02:22 T:4468 NOTICE: CommonFunctions-0.9.0
03:02:22 T:4468 NOTICE: [YouTube-2.8.0] getStoredSearches : ''
03:02:22 T:4468 NOTICE: [YouTube-2.8.0] retrieve : 'Got key 'store_disco_searches''
03:02:23 T:4468 NOTICE: [YouTube-2.8.0] list : 'store returned

not sure if got the right data there though?

Links play fine in IE/chrome. Tried resetting plugin settings to default too

my pastebin of the log

http://pastebin.com/Z36GEFUn
(This post was last modified: 2012-01-26 05:18 by Midnight Tboy.)
find quote
Post Reply