return ret\r
def execMove(title,temppath,recpath,ext,autodel):\r
srcpath=os.path.join(temppath,title+ext)\r
- sf=guess.searchFolder(title, recpath)\r
+ # patched. orig: searchFolder(title, recpath)
+ sf=guess.searchFolder(title, recpath,200)\r
if sf!="":\r
destpath=os.path.join(sf,getMoveDestpath(title, temppath, sf, ext)+ext)\r
if os.path.exists(destpath):\r
os.remove(dp)\r
""\r
except:\r
- ""\r
+ ""
+ else:
+ recdblist.printutf8("sf not fonud @ execMove",verbose_level=100)
+\r
def execDelete(title,temppath):\r
delpath=getDelpath(temppath, title,0)\r
recdblist.printutf8(title+u" 関連の一時ファイルを削除します")\r
parser.add_option("-t","--tssearch",action="store_true",dest="tssearch",default=False,help="Ts move auto search")\r
parser.add_option("-T","--Tsmove",action="store_true",dest="tsmove",default=False,help="Ts auto move.")\r
parser.add_option("-S","--SeriesNum",action="store",type="string",dest="seriespath",default="",metavar="TITLE",help="Search Series Number in the path.")\r
+ parser.add_option("-m","--manual",action="store_true",dest="manual",default=False,help="manual classifying mode asking for y/n(not a test)")\r
#parser.add_option("-f","--filenumlist",action="store_true",dest="filenumlist",default=False,help="Guess Program Number.")\r
\r
(opts,args)=parser.parse_args(sys.argv)\r
sa=auto_move.searchFile(recpath, recordedpath, ".mp4")\r
for t in sa:\r
recdblist.printutf8(u"自動推測実行中-MP4",verbose_level=100)\r
- sf=guess.searchFolder(t,recordedpath)\r
+ sf=guess.searchFolder(t,recordedpath,200)\r
if sf!="":\r
recdblist.printutf8(u"移動先",verbose_level=100)\r
recdblist.printutf8(t+" : "+os.path.join(sf, auto_move.getMoveDestpath(t, recpath,sf,".mp4")+".mp4"),verbose_level=100)\r
auto_move.execMove(t, recpath, recordedpath,".mp4",1)\r
else:\r
recdblist.printutf8(t+" can't find matching folder",verbose_level=100)\r
+ elif opts.manual:##-m の場合\r
+ # mkv無視します
+ sa=auto_move.searchFile(recpath, recordedpath, ".mp4")\r
+ for t in sa:\r
+ sf=guess.searchFolder(t,recordedpath,200)\r
+ if sf!="":\r
+ recdblist.printutf8(u"○候補:"+os.path.join(sf, auto_move.getMoveDestpath(t, recpath,sf,".mp4")+".mp4"),verbose_level=100)
+ ans = raw_input("移動しますか? (y/n/h)")
+ if ans == 'y':
+ recdblist.printutf8(u"移動を実行します",verbose_level=100)\r
+ auto_move.execMove(t, recpath, recordedpath,".mp4",1)
+ elif ans == 'n':\r
+ recdblist.printutf8(u"移動を中止します",verbose_level=100)\r
+ elif ans == 'h':\r
+ recdblist.printutf8(u"移動のヒント",verbose_level=100)\r
+ recdblist.printutf8(u"FIXME:not implemented",verbose_level=100)\r
+ else:\r
+ recdblist.printutf8(u"×不明:"+t,verbose_level=100)\r
elif opts.delete:##-Dの場合\r
sa=auto_move.searchFile(recpath, recordedpath,".mkv")\r
for t in sa:\r