# XBMC Plugin for listing and playing Zeipis TV recordings
# (c) 2009 Ben Bucksch

import urllib, urllib2, xbmcplugin, xbmcgui, sys

def start():
	addVideo("Charly Wilson", "", "http://webtest.server.bucksch.org/tv/zeipis/1/20090511-2330-101.mpg")

def addVideo(name, iconimage, url):
        ok=True
        liz=xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
        liz.setInfo( type="Video", infoLabels={ "Title": name } )
        ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=liz)
        return ok

start()

xbmcplugin.endOfDirectory(int(sys.argv[1]))
