OSDN Git Service

simplify codes.
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Wed, 24 Mar 2010 05:55:50 +0000 (05:55 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Wed, 24 Mar 2010 05:55:50 +0000 (05:55 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@525 4e526526-5e11-4fc0-8910-f8fd03428081

rec10/trunk/src/auto_move.py
rec10/trunk/src/classify.py

index e840a0d..90d959f 100644 (file)
@@ -36,7 +36,7 @@ def getTitle(title):
     return ntitle
 def search_file(temppath,recpath,ext):
     """
-    録画一時フォルダ内mkvファイルを検索
+    録画一時フォルダ内ファイルを検索
     """
     avilist = glob.glob(temppath + "/*"+ext)
     ret=[]
index 192d60e..1be4e4c 100644 (file)
@@ -28,7 +28,7 @@ if __name__ == "__main__":
     (opts,args)=parser.parse_args(sys.argv)
     if opts.ltitle!="":
         ltitle=unicode(opts.ltitle,'utf-8')
-        sf=guess.searchFolder(ltitle, recordedpath)
+        sf=guess.searchFolder(ltitle, recordedpath)[0]
         print "###MKV###"
         recdblist.printutf8(os.path.join(sf, auto_move.get_move_dest_path(ltitle,recpath,sf,".mkv")+".mkv"))
         print "###MP4###"
@@ -37,7 +37,7 @@ if __name__ == "__main__":
         sa=auto_move.search_file(recpath, recordedpath, ".mkv")
         for t in sa:
             recdblist.printutf8(u"自動推測実行中-MKV")
-            sf=guess.searchFolder(t,recordedpath)
+            sf=guess.searchFolder(t,recordedpath)[0]
             if sf!="":
                 recdblist.printutf8(u"移動先")
                 recdblist.printutf8(t+" : "+os.path.join(sf, auto_move.get_move_dest_path(t, recpath,sf,".mkv")+".mkv"))
@@ -48,7 +48,7 @@ if __name__ == "__main__":
         sa=auto_move.search_file(recpath, recordedpath, ".mp4")
         for t in sa:
             recdblist.printutf8(u"自動推測実行中-MP4")
-            sf=guess.searchFolder(t,recordedpath)
+            sf=guess.searchFolder(t,recordedpath)[0]
             if sf!="":
                 recdblist.printutf8(u"移動先")
                 recdblist.printutf8(t+" : "+os.path.join(sf, auto_move.get_move_dest_path(t, recpath,sf,".mp4")+".mp4"))
@@ -59,12 +59,12 @@ if __name__ == "__main__":
     elif opts.list:
         sa=auto_move.search_file(recpath, recordedpath,".mkv")
         for t in sa:
-            sf=guess.searchFolder(t,recordedpath)
+            sf=guess.searchFolder(t,recordedpath)[0]
             if sf!="":
                 recdblist.printutf8(t+u" : "+os.path.join(sf, auto_move.get_move_dest_path(t, recpath,sf,".mkv")+".mkv"))
         sa=auto_move.search_file(recpath, recordedpath,".mp4")
         for t in sa:
-            sf=guess.searchFolder(t,recordedpath)
+            sf=guess.searchFolder(t,recordedpath)[0]
             if sf!="":
                 recdblist.printutf8(t+u" : "+os.path.join(sf, auto_move.get_move_dest_path(t, recpath,sf,".mp4")+".mp4"))
     elif opts.etitle!="":
@@ -81,7 +81,7 @@ if __name__ == "__main__":
         if tsmovepath!="":
             sa=auto_move.search_file(recpath, tsmovepath,".ts")
             for t in sa:
-                sf=guess.searchFolder(t,tsmovepath,700)
+                sf=guess.searchFolder(t,tsmovepath,700)[0]
                 if sf!="":
                     recdblist.printutf8(t+u" : "+os.path.join(sf, auto_move.get_move_dest_path(t, recpath,sf,".ts")+".ts"))
             sa=auto_move.search_file(recpath, tsmovepath,".ts")
@@ -96,7 +96,7 @@ if __name__ == "__main__":
         if tsmovepath!="":
             sa=auto_move.search_file(recpath, tsmovepath,".ts")
             for t in sa:
-                sf=guess.searchFolder(t,tsmovepath,700)
+                sf=guess.searchFolder(t,tsmovepath,700)[0]
                 if sf!="":
                     recdblist.printutf8(u"移動先")
                     recdblist.printutf8(t+" : "+os.path.join(sf, auto_move.get_move_dest_path(t, recpath,sf,".ts")+".ts"))