'å äžºGtkæ²¡æååšQtäž­é£ä¹æ¹äŸ¿çäœ¿çšSQLite, èå¿é¡»å°æææ°æ®è¯»å¥äžäžª
liststoreäž­æè¡.'

def init_db(self):

    cache_path = os.path.join(Config.CACHE_DIR, self.app.profile['username'])
    if (not os.path.exists(cache_path)):
        os.makedirs(cache_path, exist_ok=True)
    db = os.path.join(cache_path, TASK_FILE)
    self.conn = sqlite3.connect(db)
    self.cursor = self.conn.cursor()
    sql = 'CREATE    TABLE    IF    NOT    EXISTS    tasks    (\n                                name    CHAR    NOT    NULL,\n                                path    CHAR    NOT    NULL,\n                                fsid    CHAR    NOT    NULL,\n                                size    INTEGER    NOT    NULL,\n                                currsize    INTEGER    NOT    NULL,\n                                link    CHAR,\n                                isdir    INTEGER,\n                                savename    CHAR    NOT    NULL,\n                                savedir    CHAR    NOT    NULL,\n                                state    INT    NOT    NULL,\n                                statename    CHAR    NOT    NULL,\n                                humansize    CHAR    NOT    NULL,\n                                percent    INT    NOT    NULL,\n                                tooltip    CHAR\n                                )\n                                '
    self.cursor.execute(sql)
