OSDN Git Service

classify : fix DB.
authorgn64_jp <gn64@rec10.org>
Wed, 13 Nov 2013 04:57:44 +0000 (13:57 +0900)
committergn64_jp <gn64@rec10.org>
Wed, 13 Nov 2013 04:57:44 +0000 (13:57 +0900)
rec10/classify.py
rec10/dbMySQL.py

index 1b82830..b85df53 100644 (file)
@@ -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")
index 01337bb..8a97de5 100644 (file)
@@ -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()