OSDN Git Service

classify : fix DB id undefined.
authorgn64_jp <gn64@rec10.org>
Wed, 13 Nov 2013 02:43:07 +0000 (11:43 +0900)
committergn64_jp <gn64@rec10.org>
Wed, 13 Nov 2013 02:43:07 +0000 (11:43 +0900)
rec10/classify.py
rec10/dbMySQL.py
rec10/install.py
rec10/readme.txt
rec10/recdblist.py

index c8525ec..14183e1 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # coding: UTF-8
 # Rec10 TS Recording Tools
-# Copyright (C) 2009-2011 Yukikaze
+# Copyright (C) 2009-2013 Yukikaze,long.inus
 
 import os
 import os.path
@@ -18,7 +18,7 @@ recpath=unicode(configreader.getConfPath("recpath"),'utf-8')
 
 if __name__ == "__main__":
     usage="usage: %prog read -h"
-    version="%prog 0.9.4"
+    version="%prog 0.9.10"
     parser=optparse.OptionParser(usage=usage,version=version)
     parser.add_option("-s","--search",action="store",type="string",dest="ltitle",default="",metavar="TITLE",help="test to search where the title should be contained(test for -e)")
     parser.add_option("-A","--Auto",action="store_true",dest="auto",default=False,help="auto classifying mode(not a test)")
index f2c4a88..b73dd8c 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # coding: UTF-8
 # Rec10 TS Recording Tools
-# Copyright (C) 2009-2012 Yukikaze
+# Copyright (C) 2009-2013 Yukikaze
 import MySQLdb
 import recdblist
 import warnings
@@ -66,6 +66,7 @@ class DB_MySQL:
         self.new_in_settings()
         self.new_auto_timeline_bayes()
         self.new_auto_timeline_keyword()
+        self.new_auto_classify()
     def connect_db(self):
         """
         dbへの接続
@@ -1239,6 +1240,7 @@ vim         ")
             db[1].execute('\
             CREATE TABLE auto_classify \
             (\
+            id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,\
             frompath VARCHAR(1024),\
             topath VARCHAR(1024),\
             do BOOLEAN\
@@ -1364,4 +1366,13 @@ vim         ")
         self.change_installed_in_status(1)
         self.change_version_in_status("102")
         #self.change_installed_in_status()#チャンネルスキャンをさせる
+    def update_db_102to103(sekf):
+        self.drop_in_settings()
+        self.new_in_settings()
+        self.new_epg_ch()
+        self.new_auto_classify()
+        self.close_db(db)
+        self.change_installed_in_status(1)
+        self.change_version_in_status("103")
+        #self.change_installed_in_status()#チャンネルスキャンをさせる
 
index d1f6da9..ae4f6cc 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # coding: UTF-8
 # Rec10 TS Recording Tools
-# Copyright (C) 2009-2011 Yukikaze
+# Copyright (C) 2009-2013 Yukikaze
 import time
 import os.path
 import ConfigParser
@@ -304,5 +304,8 @@ def update_db(version):
         rec10d.rec10db.update_db_100to101()
     elif version==101:
         rec10d.rec10db.update_db_100to102()
+    elif version==102:
+        rec10d.rec10db.update_db_102to103()
+        
 if __name__ == "__main__":
     move()
index 7feec4d..7caf3ae 100644 (file)
@@ -1,8 +1,8 @@
 ###########################################
 #     Rec10 -Ts Recording system-         #
 #                          Ver.0.9.10     #
-# 2012/05/12         Yukikaze & long.inus #
-#  Copyright (C) 2009-2012 Yukikaze      #
+# 2013/11/12         Yukikaze & long.inus #
+#  Copyright (C) 2009-2013 Yukikaze      #
 ###########################################
 
 本ソフトはpythonおよびperlによって書かれた録画ツールです。
index 8bb5edf..2b61f75 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # coding: UTF-8
 # Rec10 TS Recording Tools
-# Copyright (C) 2009-2011 Yukikaze
+# Copyright (C) 2009-2013 Yukikaze
 
 """
 task names
@@ -76,7 +76,7 @@ REC_BAYES_SUGGEST ="bayes_suggest"
 global BONTSDEMUX_DELAY
 BONTSDEMUX_DELAY="0"
 
-version = 102
+version = 103
 version_str="0.9.10"
 
 global verbose_level_now