From: gn64_jp Date: Wed, 13 Nov 2013 02:43:07 +0000 (+0900) Subject: classify : fix DB id undefined. X-Git-Url: http://git.osdn.net/view?p=rec10%2Frec10-git.git;a=commitdiff_plain;h=d7f5926e68d9d12f9bc9e529948250baf4406de8 classify : fix DB id undefined. --- diff --git a/rec10/classify.py b/rec10/classify.py index c8525ec..14183e1 100644 --- a/rec10/classify.py +++ b/rec10/classify.py @@ -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)") diff --git a/rec10/dbMySQL.py b/rec10/dbMySQL.py index f2c4a88..b73dd8c 100644 --- a/rec10/dbMySQL.py +++ b/rec10/dbMySQL.py @@ -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()#チャンネルスキャンをさせる diff --git a/rec10/install.py b/rec10/install.py index d1f6da9..ae4f6cc 100644 --- a/rec10/install.py +++ b/rec10/install.py @@ -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() diff --git a/rec10/readme.txt b/rec10/readme.txt index 7feec4d..7caf3ae 100644 --- a/rec10/readme.txt +++ b/rec10/readme.txt @@ -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によって書かれた録画ツールです。 diff --git a/rec10/recdblist.py b/rec10/recdblist.py index 8bb5edf..2b61f75 100644 --- a/rec10/recdblist.py +++ b/rec10/recdblist.py @@ -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