From: gn64_jp Date: Fri, 14 May 2010 06:15:18 +0000 (+0000) Subject: implement seriesnum determinant system. X-Git-Url: http://git.osdn.net/view?p=rec10%2Frec10-git.git;a=commitdiff_plain;h=cf455faa69b2d31fda8fd44eca0f875af0c7c1f3 implement seriesnum determinant system. git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@597 4e526526-5e11-4fc0-8910-f8fd03428081 --- diff --git a/rec10/trunk/src/classify.py b/rec10/trunk/src/classify.py index 2371b74..01b428c 100644 --- a/rec10/trunk/src/classify.py +++ b/rec10/trunk/src/classify.py @@ -25,6 +25,7 @@ if __name__ == "__main__": parser.add_option("-l","--list",action="store_true",dest="list",default=False,help="File listing mode(test for -A)") parser.add_option("-t","--tssearch",action="store_true",dest="tssearch",default=False,help="Ts move auto search") parser.add_option("-T","--Tsmove",action="store_true",dest="tsmove",default=False,help="Ts auto move.") + parser.add_option("-S","--SeriesNum",action="store",type="string",dest="seriespath",default="",metavar="TITLE",help="Search Series Number in the path.") #parser.add_option("-f","--filenumlist",action="store_true",dest="filenumlist",default=False,help="Guess Program Number.") (opts,args)=parser.parse_args(sys.argv) @@ -109,4 +110,7 @@ if __name__ == "__main__": auto_move.execMove(t, recpath, tsmovepath,".ts",0) sa=auto_move.search_file(recpath, tsmovepath,".ts") else: - recdblist.printutf8(u"ts_movepathが設定されていません。/etc/rec10.confを設定してください。") \ No newline at end of file + recdblist.printutf8(u"ts_movepathが設定されていません。/etc/rec10.confを設定してください。") + elif opts.seriespath!="":##-Sの場合 + ss=guess.detSeriesNum(opts.seriespath) + print ss diff --git a/rec10/trunk/src/guess.py b/rec10/trunk/src/guess.py index e8ae1a7..5e1f6ca 100644 --- a/rec10/trunk/src/guess.py +++ b/rec10/trunk/src/guess.py @@ -1,3 +1,4 @@ +import os.path #!/usr/bin/python # coding: UTF-8 # Rec10 TS Recording Tools @@ -17,6 +18,18 @@ def detName(title,path): tt=detNameType(title, path) if tt['type']=="C"or tt['type']=="D": tt['num']=detNum(tt['title'],tt['folder']) +def detSeriesNum(execpath): + files=os.listdir(execpath) + ss={} + for file in files: + ftitle=os.path.splitext(file) + fname=ftitle[0] + fname=zenhan.toHankaku(unicode(name)) + st=detNameType(fname, execpath)['title'] + if not len(ss[st])>0: + ss[st]=[] + ss[detNum(fname,execpath)]=ftitle + return ss def detNum(title,movepath): """ #番組の話数を推測する。 @@ -39,7 +52,7 @@ def detNum(title,movepath): ff.append([p1['num'],p1['title'],time1]) if maxnum)#\d(?P)\s[0,10]\z") rA=re.compile("(.+)#(\d*)\s*\Z") tA=rA.match(title) diff --git a/rec10/trunk/src/readme.txt b/rec10/trunk/src/readme.txt index 590bf0d..cac20aa 100644 --- a/rec10/trunk/src/readme.txt +++ b/rec10/trunk/src/readme.txt @@ -1,7 +1,7 @@ ########################################### # Rec10 for PT1 # # Ver.0.9.5 # -# 2010/05/02 Yukikaze # +# 2010/05/12 Yukikaze # # Copyright (C) 2009-2010 Yukikaze # ########################################### @@ -14,7 +14,7 @@ wine mencoder ffmpeg x264 -mp4box(mp4使用時) +mp4box mkvmerge(mkv使用時) java(jre1.6で動作を確認) @@ -70,6 +70,8 @@ yukikaze.jp@gmail.com b25自動削除機能の改善 自動仕分け機能のアップデート Caption2Assやaac取り出しがうまくいかないときの自動復帰処理の実装 +バグ修正 + 10/04/02 0.9.4 release バグ修正