@plugin.priority((- 255))
def on_task_output(self, task, config):
    if ((not task.accepted) and (not task.options.test)):
        return
    try:
        result = session.post('http://www.pogdesign.co.uk/cat/', data={'username': config['username'], 'password': config['password'], 'sub_login': 'Account Login'})
    except requests.RequestException as e:
        log.error(('Error logging in to pog calendar: %s' % e))
        return
    if ('logout' not in result.text):
        log.error('Username/password for pogdesign calendar appear to be incorrect.')
        return
    elif task.options.test:
        log.verbose('Successfully logged in to pogdesign calendar.')
    for entry in task.accepted:
        if ((not entry.get('series_name')) or (not (entry.get('series_id_type') == 'ep'))):
            continue
        show_id = self.find_show_id(entry['series_name'], task.session)
        if (not show_id):
            log.debug(('Could not find pogdesign calendar id for `%s`' % entry['series_name']))
            continue
        if task.options.test:
            log.verbose(('Would mark %s %s in pogdesign calenadar.' % (entry['series_name'], entry['series_id'])))
            continue
        else:
            log.verbose(('Marking %s %s in pogdesign calenadar.' % (entry['series_name'], entry['series_id'])))
        shid = ('%s-%s-%s/%s-%s' % (show_id, entry['series_season'], entry['series_episode'], datetime.now().month, datetime.now().year))
        try:
            session.post('http://www.pogdesign.co.uk/cat/watchhandle', data={'watched': 'adding', 'shid': shid})
        except requests.RequestException as e:
            log.error(('Error marking %s %s in pogdesign calendar: %s' % (entry['series_name'], entry['series_id'], e)))
@plugin.priority((- 255))
def on_task_output(self, task, config):
    if ((not task.accepted) and (not task.options.test)):
        return
    try:
        result = session.post('http://www.pogdesign.co.uk/cat/', data={'username': config['username'], 'password': config['password'], 'sub_login': 'Account Login'})
    except requests.RequestException as e:
        log.error(('Error logging in to pog calendar: %s' % e))
        return
    if ('logout' not in result.text):
        log.error('Username/password for pogdesign calendar appear to be incorrect.')
        return
    elif task.options.test:
        log.verbose('Successfully logged in to pogdesign calendar.')
    for entry in task.accepted:
        if ((not entry.get('series_name')) or (not (entry.get('series_id_type') == 'ep'))):
            continue
        show_id = self.find_show_id(entry['series_name'], task.session)
        if (not show_id):
            log.debug(('Could not find pogdesign calendar id for `%s`' % entry['series_name']))
            continue
        if task.options.test:
            log.verbose(('Would mark %s %s in pogdesign calenadar.' % (entry['series_name'], entry['series_id'])))
            continue
        else:
            log.verbose(('Marking %s %s in pogdesign calenadar.' % (entry['series_name'], entry['series_id'])))
        shid = ('%s-%s-%s/%s-%s' % (show_id, entry['series_season'], entry['series_episode'], datetime.now().month, datetime.now().year))
        try:
            session.post('http://www.pogdesign.co.uk/cat/watchhandle', data={'watched': 'adding', 'shid': shid})
        except requests.RequestException as e:
            log.error(('Error marking %s %s in pogdesign calendar: %s' % (entry['series_name'], entry['series_id'], e)))