Hi,
youtube playback is solved. XBMC or xbmc-send don't handle correctly long-url sent by iThing. I've patched playMedia function in play2wifi with:
def playMedia(self, data):
sub1 = 'Content-Location: '
sub2 = '\nStart-Position: '
location = data.split(sub1)[-1].split(sub2)[0]
self.__mylogger.debug("Found the following Media to play: "+location)
if location.find("googlevideo") > 0:
url_data = urllib.urlencode(dict("url"=location))
ret = urllib.urlopen("http://tinyurl.com/api-create.php", data=url_data).read().strip()
subprocess.call(["xbmc-send", "-a", "PlayMedia("+ret+")"], cwd="./", stdout=open("/dev/null", 'w'))
else:
subprocess.call(["xbmc-send", "-a", "PlayMedia("+location+")"], cwd="./", stdout=open("/dev/null", 'w'))
creating a tinyurl on-the-fly and works. I think that you can change the
condition (location.find("googlevideo")) and check the url length OR create a
local playlist file and then playback this file with PlayMedia function.
Bye,
Angelo
Original issue reported on code.google.com by angel...@gmail.com on 4 Jan 2011 at 11:41
Original issue reported on code.google.com by
angel...@gmail.com
on 4 Jan 2011 at 11:41