Esempio n. 1
0
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# -----------------------------------------------------------------------

import config
import kaa
from tv.record_client import RecordClient


def handler(result):
    if result:
        print _('Updated recording schedule')
    else:
        print _('Not updated recording schedule')
    raise SystemExit


rc = RecordClient()
try:
    kaa.inprogress(rc.channel).wait()
except Exception, why:
    print 'Cannot connect to record server'
    raise SystemExit

print _('Updating recording schedule')
if not rc.updateFavoritesSchedule(handler):
    print rc.recordserverdown
    raise SystemExit

kaa.main.run()
Esempio n. 2
0
    if opts.update:
        tv.epg.update(config.XMLTV_FILE)
    else:
        grab()

    import kaa
    from tv.record_client import RecordClient

    def handler(result):
        if result:
            print _('Updated recording schedule')
        else:
            print _('Not updated recording schedule')
        raise SystemExit


    rc = RecordClient()
    try:
        kaa.inprogress(rc.channel).wait()
    except Exception, why:
        print 'Cannot connect to record server'
        raise SystemExit

    print 'Scheduling favorites for recording:  '
    if not rc.updateFavoritesSchedule(handler):
        print rc.recordserverdown
        raise SystemExit

    kaa.main.run()