2012-01-21, 22:30
vijayk416 Wrote:Thanks a lot Henrik. Can you please confirm if the repo update will work for those still on dharma?
Yes it will.
Generally when we talk about plugin versions:
2.1.x series = dharma
2.5 and above = eden
vijayk416 Wrote:Thanks a lot Henrik. Can you please confirm if the repo update will work for those still on dharma?
10:35:01 T:2850184048 M:1460060160 NOTICE: -->Python Interpreter Initialized<--
10:35:02 T:2850184048 M:1459412992 NOTICE: {'limit': '4'}
10:35:05 T:3027229552 M:1448632320 WARNING: Create - Unsupported protocol(script) in script://
10:35:07 T:2850184048 M:1456984064 WARNING: Previous line repeats 1 times.
10:35:07 T:2850184048 M:1456984064 NOTICE: -->Python Interpreter Initialized<--
10:35:09 T:2850184048 M:1460932608 NOTICE: YouTube-2.1.3 ARGV: ['plugin://plugin.video.youtube/', '1', '']
10:35:10 T:2850184048 M:1460944896 NOTICE: YouTube-2.1.3 view mode: 0
10:35:11 T:2850184048 M:1461137408 NOTICE: -->Python Interpreter Initialized<--
10:35:14 T:2850184048 M:1461141504 NOTICE: YouTube-2.1.3 ARGV: ['plugin://plugin.video.youtube/', '1', '?path=/root/search&login=false&store=searches&']
10:35:14 T:2850184048 M:1461141504 NOTICE: YouTube-2.1.3 view mode: 0
10:35:17 T:2850184048 M:1461149696 NOTICE: -->Python Interpreter Initialized<--
10:35:19 T:2850184048 M:1461067776 NOTICE: YouTube-2.1.3 ARGV: ['plugin://plugin.video.youtube/', '1', '?path=/root/search&action=search&search=peppa+pig&']
10:35:20 T:2850184048 M:1461080064 NOTICE: YouTube-2.1.3 search: 'peppa pig' - page: '0'
10:35:20 T:2850184048 M:1461080064 NOTICE: YouTube-2.1.3 fetching page : http://gdata.youtube.com/feeds/api/videos?q=peppa+pig&safeSearch=moderate&start-index=1&max-results=40
10:35:20 T:2850184048 M:1461080064 NOTICE: YouTube-2.1.3 _getvideoinfo: 205165
10:35:22 T:2850184048 M:1461161984 NOTICE: YouTube-2.1.3 _getvideoinfo done : 40
10:35:22 T:2850184048 M:1461161984 NOTICE: YouTube-2.1.3 search done :40
10:35:22 T:2850184048 M:1461161984 NOTICE: YouTube-2.1.3 view mode set to: 0
10:35:22 T:2850184048 M:1461161984 NOTICE: YouTube-2.1.3 setting view mode
10:35:24 T:2850184048 M:1454039040 NOTICE: -->Python Interpreter Initialized<--
10:35:26 T:2850184048 M:1453649920 NOTICE: YouTube-2.1.3 ARGV: ['plugin://plugin.video.youtube/', '1', '?path=/root/search&action=play_video&videoid=IgButvrG_Pg']
10:35:26 T:2850184048 M:1453649920 NOTICE: YouTube-2.1.3 fetching page : http://gdata.youtube.com/feeds/api/videos/IgButvrG_Pg
10:35:27 T:2850184048 M:1453682688 NOTICE: YouTube-2.1.3 _getvideoinfo: 5212
10:35:27 T:2850184048 M:1453428736 NOTICE: YouTube-2.1.3 _getvideoinfo done : 1
10:35:27 T:2850184048 M:1453428736 NOTICE: YouTube-2.1.3 _getVideoLinks trying website
10:35:27 T:2850184048 M:1453428736 NOTICE: YouTube-2.1.3 fetching page : http://www.youtube.com/watch?v=IgButvrG_Pg&safeSearch=none
10:35:27 T:2850184048 M:1453428736 NOTICE: YouTube-2.1.3 construct video url failed contents of video item {'count': 7237609, 'Plot': 'Date Uploaded: 2011-05-26, View count: 7237609\nThe family car is very muddy. Peppa and George have lots of fun helping Mummy and Daddy clean it.', 'Title': 'Peppa Pig - Cleaning the Car', 'apierror': u"Couldn't extract video url", 'Rating': 3.9281961999999999, 'videoid': u'IgButvrG_Pg', 'next': 'false', 'Duration': '05:12', 'Genre': 'Film & Animation', 'Studio': 'eonefamily', 'user': 'eonefamily', 'Date': '2011-05-26T09:44:15.000Z', 'thumbnail': u'http://i.ytimg.com/vi/IgButvrG_Pg/0.jpg'}
10:35:27 T:2850184048 M:1453428736 ERROR: Error Type: exceptions.AttributeError
10:35:27 T:2850184048 M:1453428736 ERROR: Error Contents: YouTubePlayer instance has no attribute 'showMessage'
10:35:27 T:2850184048 M:1453428736 ERROR: Traceback (most recent call last):
File "/home/keeley/.xbmc/addons/plugin.video.youtube/default.py", line 52, in ?
navigator.executeAction(params)
File "/home/keeley/.xbmc/addons/plugin.video.youtube/YouTubeNavigation.py", line 205, in executeAction
player.playVideo(params)
File "/home/keeley/.xbmc/addons/plugin.video.youtube/YouTubePlayer.py", line 57, in playVideo
self.showErrorMessage(self.__language__(30603), video["apierror"], status)
File "/home/keeley/.xbmc/addons/plugin.video.youtube/YouTubePlayer.py", line 365, in showErrorMessage
self.showMessage(title, result)
AttributeError: YouTubePlayer instance has no attribute 'showMessage'
10:35:27 T:3078346624 M:1453428736 ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.youtube/?path=/root/search&action=play_video&videoid=IgButvrG_Pg]
vijayk416 Wrote:Can these changes please be pushed out via a repo update? Anyone on OpenElec cannot make changes to the system. This is a core plugin for XBMC so having this as a manual fix does not seem intuitive to me. Can someone with access to updating the repo please look into this?
Just ssh to your box (login: openelec/openelec) and do:
su root (default pwd: openelec)
cd ~/.xbmc/addons/plugin.video.youtube
vi YouTubePlayer.py
6:50:38 T:10472 M:633970688 NOTICE: YouTube-2.1.3
16:50:40 T:10472 M:550137856 ERROR: Error Type: exceptions.NameError
16:50:40 T:10472 M:550080512 ERROR: Error Contents: global name 'content' is not defined
16:50:40 T:10472 M:530546688 ERROR: Traceback (most recent call last):
File "C:\Users\~\AppData\Roaming\XBMC\addons\plugin.video.youtube\default.py", line 52, in ?
navigator.executeAction(params)
File "C:\Users\~\AppData\Roaming\XBMC\addons\plugin.video.youtube\YouTubeNavigation.py", line 205, in executeAction
player.playVideo(params)
File "C:\Users\~\AppData\Roaming\XBMC\addons\plugin.video.youtube\YouTubePlayer.py", line 52, in playVideo
(video, status) = self.getVideoObject(params);
File "C:\Users\~\AppData\Roaming\XBMC\addons\plugin.video.youtube\YouTubePlayer.py", line 254, in getVideoObject
(links, video) = self._getVideoLinks(video, params)
File "C:\Users\~\AppData\Roaming\XBMC\addons\plugin.video.youtube\YouTubePlayer.py", line 322, in _getVideoLinks
video["apierror"] = re.compile('reason=(.*)%3Cbr').findall(content)[0]
NameError: global name 'content' is not defined
16:50:40 T:9700 M:521093120 ERROR: XBMC.PlayMedia could not play media: plugin://plugin.video.youtube/?action=play_video&videoid=ZuMNJVImHe4
evanroheff21 Wrote:Thanks Enigma83! I tried out your fix on v2.1.3 of the plugin running on Ubuntu 10.04. For me, it was actually line 302. I'll post some more context of the code so others may try this out, until an official fix is released.
Code before changes (YouTubePlayer.py)
Code after changes (YouTubePlayer.py)Code:else:
data = result
data = data[data.find('flashvars'):].replace("\n", "").replace("&", "&")
this line --> data = re.findall('="(ttsurl=.*?)"', data)
if len(data) > 0:
player_object = self._convertFlashVars(data[0])
Code:else:
data = result
data = data[data.find('flashvars'):].replace("\n", "").replace("&", "&")
this line --> data = re.findall('flashvars="(.*?)"', data)
if len(data) > 0:
player_object = self._convertFlashVars(data[0])
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])
data = re.findall('="(ttsurl=.*?)"', data)
data = data[11:data.find('"', 12)]
player_object = self._convertFlashVars(data[0])
player_object = self._convertFlashVars(data)
jammu Wrote:You can fix this manually to OpenElec.Thank you Jammu, that did it. For the record, I had to do the second half of the fix i.e.
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
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)
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.py", 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]