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,8 +61,12 @@ Accept-Language: en-US,en;q=0.5
61 61
         content.append(("..return", "back","back.png","Return back"))
62 62
 
63 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 69
             r = self.call("bouquets?stype=tv")
65
-            content.append(("Current stream", self.name+"::"+"streamcurrent.m3u", self.img, "Current receiver stream"))
66 70
             for item in r["bouquets"]:
67 71
                 title = item[1]
68 72
                 data2 = "getservices?sRef=%s" % item[0]
@@ -124,11 +128,6 @@ Accept-Language: en-US,en;q=0.5
124 128
         if not self.is_video(data):
125 129
             return []
126 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 131
         if "stream.m3u" in data:
133 132
             data3 = data.replace("stream.m3u?ref=","epgservicenow?sRef=")
134 133
             r2 = self.call(data3)
@@ -138,6 +137,13 @@ Accept-Language: en-US,en;q=0.5
138 137
             r2 = self.call(data3)
139 138
             event = r2["now"]
140 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 147
         stream = util.item()
142 148
         stream["name"] = title
143 149
         stream["url"] = data2