Kodi Community Forum

Full Version: [depricated] old YouTube Plugin - XBMC 13.0 Frodo/Gotham only
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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("&", "&")
                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!!
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> Confused
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
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!
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=ca99425fa700191d0ad4c0f6e3eb679eWwEAAABzCwAAAHd5eDZKRFFDc2xF; 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
Midnight Tboy Wrote: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



not sure if got the right data there though?

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


I had trouble too finding the correct code until i noticed it in the youtubeplayer.py in the 2.1.3 version of the youtube plugin, not 2.80
i seem to have the same problem when it comes to watching videos sometimes it works others it doesnt!!
issue = playback failed- false
Same here. After upgrading to Eden everything was fine. Then I was watching Al Jazeera, it crashed and ever since then I can't play YouTube. Tried uninstalling, rebooting and reinstalling - didn't work. Al Jazeera and other plugins playing fine.
FML..... YouTube no longer works for me. Well at least my subscription don't.
I applied the fix a couple of days ago, worked up to this morning, now it stopped again tonight. I have also tried upgrading to Eden and the 2.7 version, but it's not working there either. Are we sure that YT isn't infecting the API so we have to watch their crappy ads?
As of Thu Jan 26 08:20:39 GMT 2012 I can confirm the Youtube plugin isn't functioning with Eden Beta 2 on Linux (Mint 12).

The log doesn't look very helpful:
Code:
08:01:51 T:2993671024  NOTICE: -->Python Interpreter Initialized<--
08:01:51 T:2993671024  NOTICE: YouTube-2.8.0
08:01:51 T:2993671024  NOTICE: CommonFunctions-0.9.0
...
08:01:52 T:2993671024  NOTICE: [YouTube-2.8.0] _getVideoLinks : 'Couldn't find url map or stream map.'
08:01:52 T:2993671024  NOTICE: [YouTube-2.8.0] _findErrors : ''
...
08:01:52 T:2993671024  NOTICE: [YouTube-2.8.0] _findErrors : 'couldn't find any errors: {'status': 200, 'content': '<!DOCTYPE ... '}'
08:01:52 T:2993671024  NOTICE: [YouTube-2.8.0] playVideo : 'construct video url failed contents of video item { ... }'
08:01:52 T:6965008   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.youtu
jackparsons Wrote:The log doesn't look very helpful:

Your're right, it isn't a full debug log (My best Tobias impression Nod)
http://code.google.com/p/youtubexbmc/wik...llDebugLog


Something has obviously changed @Youtube's end, hopefully it is an easy fix which can be sorted soon.
gott_sei_dank Wrote:Something has obviously changed @Youtube's end, hopefully it is an easy fix which can be sorted soon.
I looked at Youtube, which I'd had some "Adblockplus" rules applied to: they've changed some of the HTML/CSS, presumably to try and interfere with ad blockers... a waste of everyone's time.
jonnysarmbrace Wrote:Worked perfectly, thanks guys!

Hi there, I've tried this over and over and saw the same fix in another thread but for some reason it won't work for me. Here's the paste from my log, really appreciate any suggestions ? (I'm running pretty much vanilla XBMC 10.1 on OS X 10.7)

Thanks!


22:20:54 T:2955448320 M:131579904 ERROR: Error Type: exceptions.AttributeError
22:20:54 T:2955448320 M:131579904 ERROR: Error Contents: YouTubePlayer instance has no attribute 'showMessage'
22:20:54 T:2955448320 M:131489792 ERROR: Traceback (most recent call last):
File "/Users/jdbox/Library/Application Support/XBMC/addons/plugin.video.youtube/default.py", line 52, in ?
navigator.executeAction(params)
File "/Users/jdbox/Library/Application Support/XBMC/addons/plugin.video.youtube/YouTubeNavigation.py", line 205, in executeAction
player.playVideo(params)
File "/Users/jdbox/Library/Application Support/XBMC/addons/plugin.video.youtube/YouTubePlayer.py", line 57, in playVideo
self.showErrorMessage(self.__language__(30603), video["apierror"], status)
File "/Users/jdbox/Library/Application Support/XBMC/addons/plugin.video.youtube/YouTubePlayer.py", line 365, in showErrorMessage
self.showMessage(title, result)
AttributeError: YouTubePlayer instance has no attribute 'showMessage'
I'm guessing youtube is broken for everyone now then, on Eden?

Very very rarely it will work. It seems if I go into IE and play a youtube video, and let it play its advert...then I can maybe sometimes get 1 or 2 plays out of XBMC....but afterwards it stops again.......so at a speculation maybe they've changed their ads method?
HI, i was looking into our playback code and it seems that youtube changed a lot behind the scenes, several different problems with our automated testing prevented us from discovering this was happening, which puts us in our current situation. I'm working on some new playback code, that will fix this most pressing issue, but we have alot of broken test on our server and as such a release will have to wait until we've had a chance to look into all of them.

From a cursory glance it looks like youtubes recent changes to their api broke alot of V2 calls that the plugin relies on, breaking stuff like subscriptions and playlists.