2015-08-22, 18:57
(2015-08-22, 11:05)tom66 Wrote: OK for anyone with this problem. It seems certain new streams in VEVO or YouTube Music are causing problems. A quick hack is to replace function get_video_streams in "plugin.video.youtube/resources/lib/youtube/client/youtube.py" with THIS:
Code:def get_video_streams(self, context, video_id):
video_info = VideoInfo(context, access_token=self._access_token, language=self._language)
video_streams = video_info.load_stream_infos(video_id)
# update title
for video_stream in video_streams:
if 'title' not in video_stream:
continue # bad stream
title = '[B]%s[/B] (%s;%s / %s@%d)' % (
video_stream['title'], video_stream['container'], video_stream['video']['encoding'],
video_stream['audio']['encoding'], video_stream['audio']['bitrate'])
video_stream['title'] = title
pass
return video_streams
All I have added is a line to skip over video streams without a title. Still seems to find 720p streams fine. Not sure what these do and would wait for an addon dev to fix the plugin to prevent the selection of these in the first place but if you need a quick fix this seems to work for me. Great as I have some friends visiting who love using the Raspberry Pi with YouTube. Makes for a great "smart TV"!
Remember to keep the code indented properly as it is Python.
Tested the 2 lines you added and works with VEVO videos.