OSDN Git Service

the first release of 0.5
[rec10/rec10-git.git] / rec10 / branches / 0.5 / src / epgrefresh.py
diff --git a/rec10/branches/0.5/src/epgrefresh.py b/rec10/branches/0.5/src/epgrefresh.py
new file mode 100755 (executable)
index 0000000..7de1fd9
--- /dev/null
@@ -0,0 +1,25 @@
+#!/usr/bin/python
+# coding: UTF-8
+# Rec10 TS Recording Tools
+# Copyright (C) 2009 Yukikaze
+import chdb
+import os
+import time
+import epgdb
+import sys
+
+update=chdb.update()
+print "番組表更新処理"
+print update
+if len(update)>0:
+    print "番組表を更新"
+    print update
+    pid=os.fork()
+    if pid>0:#親プロセスの場合
+        ""
+    else:#子プロセスの場合 アップデートを行って終了
+        for bctype in update:
+            time.sleep(1)
+            print bctype
+            epgdb.updatebc(bctype)
+        sys.exit(0)
\ No newline at end of file