2013-03-21, 02:32
It feels like its loading faster than before
(2013-03-21, 01:34)Elbulus Wrote: For those who might struggle with code here is the file modified for you, just drop this over the top of the old YouTubePlayer.py
https://www.dropbox.com/s/q3ykhe2vn4j2z3...ePlayer.py
Thank you Kaylakaze for working it out so quickly
(2013-03-21, 00:48)Kaylakaze Wrote: Fixed it. from line 299 in YouTubePlayer, changeThank you. It works.
Code:if line.strip().startswith("yt.playerConfig = "):
found = True
p1 = line.find("=")
p2 = line.rfind(";")
if p1 <= 0 or p2 <= 0:
continue
data = line[p1 + 1:p2]
break
to
Code:index = line.find("ytplayer.config =")
if index != -1:
found = True
p1 = line.find("=", (index-3))
p2 = line.rfind(";")
if p1 <= 0 or p2 <= 0:
continue
data = line[p1 + 1:p2]
break
sorry that the indents are not properly aligned in the code pasting
This demonstrates why whenever you're scraping a web page, it's dangerous to assume where on the page something will be located. Youtube changed their page format so that ytplayer.config is no longer at the beginning of a line.
(2013-03-21, 01:34)Elbulus Wrote: For those who might struggle with code here is the file modified for you, just drop this over the top of the old YouTubePlayer.pyThis fix works on Linux Mint 12, XBMC 13 Alpha 1
https://www.dropbox.com/s/q3ykhe2vn4j2z3...ePlayer.py
Thank you Kaylakaze for working it out so quickly
(2013-03-21, 09:34)jackparsons Wrote: To put it kindly, the YouTube plugin needs some serious refactoring. Friends of mine who have commercially-made software in their TV to play YouTube don't see it breaking all the time like this.
(2013-03-21, 12:21)Thinaran Wrote: I'm getting mad! My YouTubePlayer.py is identical to the 'fixed' one and I'm still getting Playback failed, can't find video url.
It says to check the log file but there's nothing in the ~/.xbmc/temp/xbmc.log
Is there an addon log file? Where is it?
(2013-03-21, 01:34)Elbulus Wrote: For those who might struggle with code here is the file modified for you, just drop this over the top of the old YouTubePlayer.py
https://www.dropbox.com/s/q3ykhe2vn4j2z3...ePlayer.py
Thank you Kaylakaze for working it out so quickly