#!/usr/bin/env python




##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
    import builtins as builtin
except ImportError:
    import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
from Cheetah.Template import Template
from Cheetah.DummyTransaction import *
from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
from Cheetah.CacheRegion import CacheRegion
import Cheetah.Filters as Filters
import Cheetah.ErrorCatchers as ErrorCatchers

##################################################
## MODULE CONSTANTS
VFFSL=valueFromFrameOrSearchList
VFSL=valueFromSearchList
VFN=valueForName
currentTime=time.time
__CHEETAH_version__ = '2.4.4'
__CHEETAH_versionTuple__ = (2, 4, 4, 'development', 0)
__CHEETAH_genTime__ = 1406885498.4668
__CHEETAH_genTimestamp__ = 'Fri Aug  1 18:31:38 2014'
__CHEETAH_src__ = '/home/wslee2/models/5-wo/force1plus/openpli3.0/build-force1plus/tmp/work/mips32el-oe-linux/enigma2-plugin-extensions-openwebif-1+git5+3c0c4fbdb28d7153bf2140459b553b3d5cdd4149-r0/git/plugin/controllers/views/web/movielist.tmpl'
__CHEETAH_srcLastModified__ = 'Fri Aug  1 18:30:05 2014'
__CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'

if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
    raise AssertionError(
      'This template was compiled with Cheetah version'
      ' %s. Templates compiled before version %s must be recompiled.'%(
         __CHEETAH_version__, RequiredCheetahVersion))

##################################################
## CLASSES

class movielist(Template):

    ##################################################
    ## CHEETAH GENERATED METHODS


    def __init__(self, *args, **KWs):

        super(movielist, self).__init__(*args, **KWs)
        if not self._CHEETAH__instanceInitialized:
            cheetahKWArgs = {}
            allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
            for k,v in KWs.items():
                if k in allowedKWs: cheetahKWArgs[k] = v
            self._initCheetahInstance(**cheetahKWArgs)
        

    def respond(self, trans=None):



        ## CHEETAH: main method generated for this template
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        _orig_filter_90714292 = _filter
        filterName = u'WebSafe'
        if self._CHEETAH__filters.has_key("WebSafe"):
            _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName]
        else:
            _filter = self._CHEETAH__currentFilter = \
			self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter
        write(u'''<?xml version="1.0" encoding="UTF-8"?>
<e2movielist>
''')
        for movie in VFFSL(SL,"movies",True): # generated from line 4, col 2
            write(u'''\t\t<e2movie>
\t\t\t<e2servicereference>''')
            _v = VFFSL(SL,"movie.fullname",True) # u'$movie.fullname' on line 6, col 24
            if _v is not None: write(_filter(_v, rawExpr=u'$movie.fullname')) # from line 6, col 24.
            write(u'''</e2servicereference>
\t\t\t<e2title>''')
            _v = VFFSL(SL,"movie.eventname",True) # u'$movie.eventname' on line 7, col 13
            if _v is not None: write(_filter(_v, rawExpr=u'$movie.eventname')) # from line 7, col 13.
            write(u'''</e2title>
\t\t\t<e2description>''')
            _v = VFFSL(SL,"movie.description",True) # u'$movie.description' on line 8, col 19
            if _v is not None: write(_filter(_v, rawExpr=u'$movie.description')) # from line 8, col 19.
            write(u'''</e2description>
\t\t\t<e2descriptionextended>''')
            _v = VFFSL(SL,"movie.descriptionExtended",True) # u'$movie.descriptionExtended' on line 9, col 27
            if _v is not None: write(_filter(_v, rawExpr=u'$movie.descriptionExtended')) # from line 9, col 27.
            write(u'''</e2descriptionextended>
\t\t\t<e2servicename>''')
            _v = VFFSL(SL,"movie.servicename",True) # u'$movie.servicename' on line 10, col 19
            if _v is not None: write(_filter(_v, rawExpr=u'$movie.servicename')) # from line 10, col 19.
            write(u'''</e2servicename>
\t\t\t<e2time>''')
            _v = VFFSL(SL,"movie.recordingtime",True) # u'$movie.recordingtime' on line 11, col 12
            if _v is not None: write(_filter(_v, rawExpr=u'$movie.recordingtime')) # from line 11, col 12.
            write(u'''</e2time>
\t\t\t<e2length>''')
            _v = VFFSL(SL,"movie.length",True) # u'$movie.length' on line 12, col 14
            if _v is not None: write(_filter(_v, rawExpr=u'$movie.length')) # from line 12, col 14.
            write(u'''</e2length>
\t\t\t<e2tags>''')
            _v = VFFSL(SL,"movie.tags",True) # u'$movie.tags' on line 13, col 12
            if _v is not None: write(_filter(_v, rawExpr=u'$movie.tags')) # from line 13, col 12.
            write(u'''</e2tags>
\t\t\t<e2filename>''')
            _v = VFFSL(SL,"movie.filename",True) # u'$movie.filename' on line 14, col 16
            if _v is not None: write(_filter(_v, rawExpr=u'$movie.filename')) # from line 14, col 16.
            write(u'''</e2filename>
\t\t\t<e2filesize>''')
            _v = VFFSL(SL,"movie.filesize",True) # u'$movie.filesize' on line 15, col 16
            if _v is not None: write(_filter(_v, rawExpr=u'$movie.filesize')) # from line 15, col 16.
            write(u'''</e2filesize>
\t\t</e2movie>
''')
        write(u'''</e2movielist>
''')
        _filter = self._CHEETAH__currentFilter = _orig_filter_90714292
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        
    ##################################################
    ## CHEETAH GENERATED ATTRIBUTES


    _CHEETAH__instanceInitialized = False

    _CHEETAH_version = __CHEETAH_version__

    _CHEETAH_versionTuple = __CHEETAH_versionTuple__

    _CHEETAH_genTime = __CHEETAH_genTime__

    _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__

    _CHEETAH_src = __CHEETAH_src__

    _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__

    _mainCheetahMethod_for_movielist= 'respond'

## END CLASS DEFINITION

if not hasattr(movielist, '_initCheetahAttributes'):
    templateAPIClass = getattr(movielist, '_CHEETAH_templateClass', Template)
    templateAPIClass._addCheetahPlumbingCodeToClass(movielist)


# CHEETAH was developed by Tavis Rudd and Mike Orr
# with code, advice and input from many other volunteers.
# For more information visit http://www.CheetahTemplate.org/

##################################################
## if run from command line:
if __name__ == '__main__':
    from Cheetah.TemplateCmdLineIface import CmdLineIface
    CmdLineIface(templateObj=movielist()).run()


