From 9c8a213fb353606740c3db4c7e6a3c4703b99d6e Mon Sep 17 00:00:00 2001 From: gn64_jp Date: Wed, 13 Nov 2013 13:57:44 +0900 Subject: [PATCH] classify : fix DB. --- rec10/classify.py | 5 +---- rec10/dbMySQL.py | 9 +++------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/rec10/classify.py b/rec10/classify.py index 1b82830..b85df53 100644 --- a/rec10/classify.py +++ b/rec10/classify.py @@ -88,10 +88,7 @@ if __name__ == "__main__": dbl=rec10d.rec10db.select_move_auto_classify() if len(dbl)>0: for dbt in dbl: - title= dbt[1] - #frompath = dbt[1] - #topath = dbt[2] - #t=os.path.splitext(os.path.split(frompath)[1])[0] + t= dbt[1] auto_move.execMove(t, recpath, recordedpath,".mp4",1) rec10d.rec10db.delete_refresh_auto_classify() sa=auto_move.searchFile(recpath, recordedpath, ".mp4") diff --git a/rec10/dbMySQL.py b/rec10/dbMySQL.py index 01337bb..8a97de5 100644 --- a/rec10/dbMySQL.py +++ b/rec10/dbMySQL.py @@ -1242,8 +1242,8 @@ vim ") (\ id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,\ title VARCHAR(100),\ - frompath VARCHAR(1024),\ - topath VARCHAR(1024),\ + frompath VARCHAR(400),\ + topath VARCHAR(400),\ do BOOLEAN,\ UNIQUE key (title)\ )') @@ -1280,10 +1280,7 @@ vim ") if dbexe > 0: dls = db[1].fetchall() self.close_db(db) - if len(dls)>0: - return dls[0] - else: - return dls + return dls def update_db_to93(self): db = self.connect_db() self.drop_in_settings() -- 2.11.0