You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 [email protected] on 4 Jan 2011 at 11:41
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 4 Jan 2011 at 11:41The text was updated successfully, but these errors were encountered: