recdblist.printutf8(u"×不明:"+t,verbose_level=100)
elif opts.rec10:##-r の場合
# mkv無視します
- sa=auto_move.searchFile(recpath, recordedpath, ".mp4")
- for t in sa:
- sf=guess.searchFolder(t,recordedpath,200)
- if sf!="":
- frompath = os.path.join(recpath, t + ".mp4")
- topath = os.path.join(sf, auto_move.getMoveDestpath(t, recpath,sf,".mp4")+".mp4")
- rec10d.rec10db.add_auto_classify(t,frompath, topath)
dbl=rec10d.rec10db.select_move_auto_classify()
if len(dbl)>0:
for dbt in dbl:
#topath = dbt[2]
#t=os.path.splitext(os.path.split(frompath)[1])[0]
auto_move.execMove(t, recpath, recordedpath,".mp4",1)
+ rec10d.rec10db.delete_refresh_auto_classify()
+ sa=auto_move.searchFile(recpath, recordedpath, ".mp4")
+ for t in sa:
+ sf=guess.searchFolder(t,recordedpath,200)
+ if sf!="":
+ frompath = os.path.join(recpath, t + ".mp4")
+ topath = os.path.join(sf, auto_move.getMoveDestpath(t, recpath,sf,".mp4")+".mp4")
+ rec10d.rec10db.add_auto_classify(t,frompath, topath)
elif opts.delete:##-Dの場合
sa=auto_move.searchFile(recpath, recordedpath,".mkv")
for t in sa:
title VARCHAR(1024),\
frompath VARCHAR(1024),\
topath VARCHAR(1024),\
- do BOOLEAN\
+ do BOOLEAN,\
+ UNIQUE key (title),\
)')
except Exception, inst:
if not ((type(inst)==MySQLdb.ProgrammingError and inst[0]==1007)or(type(inst)==MySQLdb.OperationalError and inst[0]==1050)):
values (%s,%s,%s,0)', \
(title,frompath, topath))
self.close_db(db)
+ def delete_refresh_auto_classify(self):
+ db = self.connect_db()
+ db[1].execute("\
+ DROP TABLE auto_classify")
+ self.close_db(db)
+ self.new_auto_classify()
def delete_old_auto_classify(self, frompath):
db = self.connect_db()
db[1].execute("\