Update of /cvsroot/freevo/freevo/WIP/RobShortt
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16532

Added Files:
        genstreamdevfxd.py 
Log Message:
A little script to generate a VIDEO_ITEMS fxd file containing entries for
each channel on a VDR streamdev server.  The entries are based on a vdr
style channels.conf.


--- 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], '&', '&amp;')
    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 The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to