Browse Source

darba versija

Ivars 6 years ago
parent
commit
94d705cc3d
1 changed files with 12 additions and 6 deletions
  1. 12
    6
      sources/enigma2.py

+ 12
- 6
sources/enigma2.py View File

61
         content.append(("..return", "back","back.png","Return back"))
61
         content.append(("..return", "back","back.png","Return back"))
62
 
62
 
63
         if clist=="home":
63
         if clist=="home":
64
+            data3 = "getcurrent"
65
+            r2 = self.call(data3)
66
+            event = r2["now"]
67
+            title, img, desc = self.get_title_desc(event)
68
+            content.append(("Current stream: "+title, self.name+"::"+"streamcurrent.m3u", img, desc))
64
             r = self.call("bouquets?stype=tv")
69
             r = self.call("bouquets?stype=tv")
65
-            content.append(("Current stream", self.name+"::"+"streamcurrent.m3u", self.img, "Current receiver stream"))
66
             for item in r["bouquets"]:
70
             for item in r["bouquets"]:
67
                 title = item[1]
71
                 title = item[1]
68
                 data2 = "getservices?sRef=%s" % item[0]
72
                 data2 = "getservices?sRef=%s" % item[0]
124
         if not self.is_video(data):
128
         if not self.is_video(data):
125
             return []
129
             return []
126
         source,data,path,plist,clist,params,qs = self.parse_data(data)
130
         source,data,path,plist,clist,params,qs = self.parse_data(data)
127
-        r = self._http_request(self.url+data)
128
-        m =  re.search("(http(s)*:.+)", r)
129
-        if not m:
130
-            raise Exception("No streams found!")
131
-        data2 = m.group(1)
132
         if "stream.m3u" in data:
131
         if "stream.m3u" in data:
133
             data3 = data.replace("stream.m3u?ref=","epgservicenow?sRef=")
132
             data3 = data.replace("stream.m3u?ref=","epgservicenow?sRef=")
134
             r2 = self.call(data3)
133
             r2 = self.call(data3)
138
             r2 = self.call(data3)
137
             r2 = self.call(data3)
139
             event = r2["now"]
138
             event = r2["now"]
140
         title, img, desc = self.get_title_desc(event)
139
         title, img, desc = self.get_title_desc(event)
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
         stream = util.item()
147
         stream = util.item()
142
         stream["name"] = title
148
         stream["name"] = title
143
         stream["url"] = data2
149
         stream["url"] = data2