Update of /cvsroot/freevo/freevo/WIP/RobShortt/helpers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19562/helpers
Added Files:
genstreamdevchan.py genstreamdevfxd.py
Log Message:
Move into helpers dir.
--- NEW FILE: genstreamdevchan.py ---
#!/usr/bin/env python
import os, string
channels_conf = '/media/vdr/channels.conf'
streamdev_host = 'localhost'
streamdev_port = 3080
streamdev_type = 'PS'
chan_low_range = 20200
chan_hi_range = 20780
print 'TV_CHANNELS = ['
vdrconf = open(channels_conf, 'r')
for line in vdrconf.readlines():
fields = string.split(line, ':')
if len(fields) < 13:
continue
chan = int(fields[12])
cname = fields[0]
if chan < chan_low_range or chan > chan_hi_range:
continue
stream_url = 'http://%s:%s/%s/%s' % (streamdev_host, streamdev_port,
streamdev_type, chan)
print ' (\'C%s%s.dvb\', \'%s %s\', \'%s\'), ' % (chan, string.lower(cname),
chan, cname,
stream_url)
print ' ]'
--- NEW FILE: genstreamdevfxd.py ---
#!/usr/bin/env python
import os, string
channels_conf = '/media/vdr/channels.conf'
streamdev_host = 'localhost'
streamdev_port = 3080
player = 'mplayer'
chan_low_range = 20200
chan_hi_range = 20780
print """<?xml version="1.0" ?>
<freevo>
<container title="Satellite TV" type="tv">
"""
vdrconf = open(channels_conf, 'r')
for line in vdrconf.readlines():
fields = string.split(line, ':')
if len(fields) < 13:
continue
chan = int(fields[12])
if chan < chan_low_range or chan > chan_hi_range:
continue
cname = string.replace(fields[0], '&', '&')
print ' <movie title="%s">' % cname
print ' <video>'
print ' <url id="%s">' % chan
print ' http://%s:%s/PS/%s' % (streamdev_host, streamdev_port, chan)
print ' <player>%s</player>' % player
print ' </url>'
print ' </video>'
print ' <info>'
print ' <description>%s</description>' % cname
print ' </info>'
print ' </movie>'
print """
<info>
<description>Streaming satellite TV from VDR</description>
</info>
</container>
</freevo>
"""
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog