OSDN Git Service

add logo search.
[rec10/rec10-git.git] / rec10 / trunk / src / chdb.py
index 1503f5a..bfea9a4 100644 (file)
@@ -30,6 +30,14 @@ def searchCHFromCh(chin):
     if len(ret) == 0:
         ret.append(None)
     return ret[0]
+def searchCHFromCsch(cschin):
+    ret = []
+    for datum in rec10d.rec10db.select_by_csch_epg_ch(cschin):
+        rett = {'bctype':datum[0], 'chtxt':datum[1], 'ch':datum[2], 'csch':datum[3], 'update':datum[4], 'chname':datum[5], 'visible':datum[7]}
+        ret.append(rett)
+    if len(ret) == 0:
+        ret.append(None)
+    return ret[0]
 def searchAllCHFromCh(chin):
     ret = []
     for datum in rec10d.rec10db.select_by_ch_epg_ch(chin):
@@ -51,7 +59,6 @@ def update():
     CSupdate = 0
     CS2update = 0
     BSupdate = 0
-    HUupdate = 0
     rec10d.rec10db.set_new_status("8")
     for datum in rec10d.rec10db.select_get_update_epg_ch("6"):
         bctype = datum[0]
@@ -71,4 +78,15 @@ def update():
             ret.append(bctype)
     return ret
 def changeCHShow(chtxt,isshow):
-    rec10d.rec10db.change_visible_epg_ch(chtxt, isshow)
\ No newline at end of file
+    rec10d.rec10db.change_visible_epg_ch(chtxt, isshow)
+def updateLogo():
+    ret=[]
+    BSCSUpdate=0
+    for datum in rec10d.rec10db.select_get_updatelogo_epg_ch("720"):
+        bctype=datus[0]
+        if bctype == "cs1" or bctype == u"cs1":
+            ret.append(u"bs")
+            BSCSUpdate=1
+        else:
+            ret.append(bctype)
+    return ret