2004-07-16, 02:21
this is a very simple script for the dbox2 with neutrino
i am workign on a better version with more features but it runs a bit unstable - so if anyone wants to try it feel free
thx to geminiserver for his script
just change to your ip and start the script,
you can select a channel and zap to it - afterwards it will
be streamed
i am workign on a better version with more features but it runs a bit unstable - so if anyone wants to try it feel free
thx to geminiserver for his script
Quote:import xbmc,xbmcgui
import os, urllib, string, stringio
# dbox settings
ip = '192.168.1.100'
# default 31337 (ps), or 32339 (ts)
port = ':31337'
url = 'http://'+ip
vpid = '0'
apid = '0'
selected = ''
channels = []
bouquets = []
def show_channellist():
dialog = xbmcgui.dialog()
list = []
channel_ids = []
channellist = urllib.urlopen(url+'/control/channellist')
for line in channellist.readlines():
list.append(line[line.find('\x20'):])
channel_ids.append(line[:line.find('\x20')])
selected = dialog.select('channels', list)
returncode = urllib.urlopen(url+'/control/zapto?'+channel_ids[selected])
dialog.ok("channel", "selected: " + list[selected]+' channel id: '+channel_ids[selected]+' code: '+returncode.readline())
def stream_dbox2():
fp = urllib.urlopen(url+'/control/zapto?getpids')
dec_vpid = fp.readline()
dec_apid = fp.readline()
fp.close()
vpid = hex(int(dec_vpid))[2:]
apid = hex(int(dec_apid))[2:]
print 'streaming from dbox vpid: '+vpid+' apid: '+apid
file = url+port+'/'+vpid+','+apid
print 'complete url: '+file
xbmc.player().play(file)
show_channellist()
stream_dbox2()
just change to your ip and start the script,
you can select a channel and zap to it - afterwards it will
be streamed