''

def add_task(self, pcs_file, dirname=''):

    if pcs_file['isdir']:
        return
    fs_id = str(pcs_file['fs_id'])
    row = self.get_row_by_fsid(fs_id)
    if row:
        self.app.toast(_('Task    exists:    {0}').format(pcs_file['server_filename']))
        if (row[STATE_COL] == State.FINISHED):
            self.launch_app(fs_id)
        return
    if (not dirname):
        dirname = self.app.profile['save-dir']
    save_dir = os.path.dirname(os.path.join(dirname, pcs_file['path'][1:]))
    save_name = pcs_file['server_filename']
    human_size = util.get_human_size(pcs_file['size'])[0]
    tooltip = gutil.escape(_('From    {0}\nTo    {1}').format(pcs_file['path'], save_dir))
    task = (pcs_file['server_filename'], pcs_file['path'], fs_id, pcs_file['size'], 0, '', pcs_file['isdir'], save_name, save_dir, State.WAITING, StateNames[State.WAITING], human_size, 0, tooltip)
    self.liststore.append(task)
    self.add_task_db(task)
    self.scan_tasks()
