Ejemplo n.º 1
0
    def _onTimer(self, event):
        """
        Periodic update event to control the throbber and
        other menu elements
        """
    
        # send messages from thread queue to log window
        q = viewmgr.retriever.msg_queue
        msgs = 30
        while not q.empty() and msgs > 0:
            viewmgr.app_log(q.get())
            msgs -= 1

        # send messages from webserver queue to log window
        q = reactor.msg_queue
        msgs = 30
        while not q.empty() and msgs > 0:
            viewmgr.app_log(q.get())
            msgs -= 1

        # show queue progress
        bs, cs = viewmgr.retriever.getProgress()
        self._queue.SetRange(bs)
        self._queue.SetValue(cs)
            
        # kick view manager to probe for new series        
        viewmgr.probe_series()      
Ejemplo n.º 2
0
def execute(cmd, id, args):
    cb = synccmd.SyncCommand(id)

    if cmd in _cmd_dispatcher:
        try:
            _cmd_dispatcher[cmd](cb, args)
        except WebDispatchError, msg:
            viewmgr.app_log("Internal error occured: %s" % str(msg))
            cb.html = "<h1>Internal Error Occured</h1><br>%s" % str(msg)
Ejemplo n.º 3
0
def execute(cmd, id, args):
    cb = synccmd.SyncCommand(id)

    if cmd in _cmd_dispatcher:
        try:
            _cmd_dispatcher[cmd](cb, args)
        except WebDispatchError, msg:
            viewmgr.app_log("Internal error occured: %s" % str(msg))
            cb.html = "<h1>Internal Error Occured</h1><br>%s" % str(msg)
Ejemplo n.º 4
0
    def _onWebRequest(self, event):
        """ Handle request of the web browser plugin """
        id = event.callid
        cmd = event.cmd
        args = event.args

        viewmgr.app_log("Received command '%s' with id %i from web browser" % (cmd, id))

        if cmd == "show_airs":
            viewmgr.set_view(series_filter.VIEW_WHATS_ON)
            wx.CallLater(500, self._doRestore)
            
        webdispatch.execute(cmd, id, args)
Ejemplo n.º 5
0
    def _onWebRequest(self, event):
        """ Handle request of the web browser plugin """
        id = event.callid
        cmd = event.cmd
        args = event.args

        viewmgr.app_log("Received command '%s' with id %i from web browser" %
                        (cmd, id))

        if cmd == "show_airs":
            viewmgr.set_view(series_filter.VIEW_WHATS_ON)
            wx.CallLater(500, self._doRestore)

        webdispatch.execute(cmd, id, args)