Browse Source

darba versija

Ivars 6 years ago
parent
commit
fe9cfede2d
1 changed files with 7 additions and 7 deletions
  1. 7
    7
      sources/enigma2.py

+ 7
- 7
sources/enigma2.py View File

99
         t2 = event["begin_timestamp"] + event["duration_sec"]
99
         t2 = event["begin_timestamp"] + event["duration_sec"]
100
         t1 = datetime.datetime.fromtimestamp(t1).strftime("%H:%M")
100
         t1 = datetime.datetime.fromtimestamp(t1).strftime("%H:%M")
101
         t2 = datetime.datetime.fromtimestamp(t2).strftime("%H:%M")
101
         t2 = datetime.datetime.fromtimestamp(t2).strftime("%H:%M")
102
-        title = "%s - %s []%s-%s]" % (event["sname"], event["title"], t1, t2)
102
+        title = "%s - %s [%s-%s]" % (event["sname"], event["title"], t1, t2)
103
         desc = event["shortdesc"]
103
         desc = event["shortdesc"]
104
         if event["longdesc"]:
104
         if event["longdesc"]:
105
             desc += "\n" + event["longdesc"]
105
             desc += "\n" + event["longdesc"]
138
             event = r2["now"]
138
             event = r2["now"]
139
         title, img, desc = self.get_title_desc(event)
139
         title, img, desc = self.get_title_desc(event)
140
 
140
 
141
-        #r = self.call(data)
142
-        #m =  re.search("(http(s)*:.+)", r)
143
-        #if not m:
144
-        #    raise Exception("No streams found!")
145
-        #data2 = m.group(1)
146
-        data2 = "http://videolink"
141
+        r = self.call(data)
142
+        m =  re.search("(http(s)*:.+)", r)
143
+        if not m:
144
+            raise Exception("No streams found!")
145
+        data2 = m.group(1)
146
+        #data2 = "http://videolink"
147
         stream = util.item()
147
         stream = util.item()
148
         stream["name"] = title
148
         stream["name"] = title
149
         stream["url"] = data2
149
         stream["url"] = data2