else:
cmpp=os.path.basename(dirp)
appp=os.path.dirname(dirp)
- rT=re.compile("(.+)_(\d*)\Z")
- tT=rT.match(title)
- tT2=rT.match(cmpp)
- rT3=re.compile("(.+)_(.+)_(\d*)\Z")#_(aichi)_2010-02-06T01:59:00.mkv
- tT3=rT3.match(title)
- rT4=re.compile("(.+)_(.+)_\d-\d-\dT\d:\d:\d\Z")#_(aichi)_2010-02-06T01:59:00.mkv
- tT4=rT4.match(title)
- if tT :
- ntitle=tT.group(0)
- elif tT3:
- ntitle=tT3.group(0)
- elif tT4:
- ntitle=tT4.group(0)
- if tT2:
- cmpp=cmpp.group(0)
+ ntitle=getTitle(title)
+ cmpp=getTitle(cmpp)
p=n_gram.trigram(ntitle,cmpp)
if p>0:
ngram.append((p,appp))
return ""
else:
return ""
+def getTitle(title):
+ rT=re.compile("(.+)_(\d*)\Z")
+ tT=rT.match(title)
+ rT2=re.compile("(.+)_(.+)_(\d*)\Z")#_(aichi)_2010-02-06T01:59:00.mkv
+ tT2=rT2.match(title)
+ rT3=re.compile("(.+)_(.+)_\d-\d-\dT\d:\d:\d\Z")#_(aichi)_2010-02-06T01:59:00.mkv
+ tT3=rT3.match(title)
+ ntitle=title
+ if tT :
+ ntitle=tT.group(0)
+ elif tT2:
+ ntitle=tT3.group(0)
+ elif tT3:
+ ntitle=tT4.group(0)
+ return ntitle
def execMove(title,temppath,recpath):
srcpath=os.path.join(temppath,title+".mkv")
#desttitle=destName(title, temppath, recpath)
# Copyright (C) 2009-2010 Yukikaze
#import sys
import os
+import tv2avi
import tv2mkv
#import datetime
#import rec10d
recordedpath = "/home/ftpusr/ftp5/Series-Finish/"
if __name__ == "__main__":
- tv2mkv.ts2mkv(recpath+u"[二]神秘の東洋医学 #2 【特集:医学を考える】.m2v", recpath+u"[二]神秘の東洋医学 #2 【特集:医学を考える】.mkv", "Ld2")
- ""
-
\ No newline at end of file
+ ""
\ No newline at end of file
recdb.delete_old("24")
recdb.delete_old_auto_bayes("1")
recdb.delete_old_auto_keyword("1")
- tasks = recdb.getnow("2")
+ tasks = recdb.getnow("3")
inum = recdb.countRecNow_minutes("10")
recdblist.printutf8(u"rec10処理開始"+ datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
recdblist.printutf8(u"直近録画予約件数:" + str(inum) + u"BS/CS録画中件数:" + str(status.getBSCSRecording()) + u"TE録画中件数:" + str(status.getTERecording()) )