Browse Source

palabots enigma2

Ivars 6 years ago
parent
commit
82e67eb4e8
2 changed files with 10 additions and 8 deletions
  1. BIN
      picons/enigma2.png
  2. 10
    8
      sources/enigma2.py

BIN
picons/enigma2.png View File


+ 10
- 8
sources/enigma2.py View File

65
             r2 = self.call(data3)
65
             r2 = self.call(data3)
66
             event = r2["now"]
66
             event = r2["now"]
67
             title, img, desc = self.get_title_desc(event)
67
             title, img, desc = self.get_title_desc(event)
68
-            content.append(("Current stream: "+title, self.name+"::"+"streamcurrent.m3u", img, desc))
68
+            content.append(("Current stream: "+title, self.name+"::"+"streamcurrent", img, desc))
69
             r = self.call("bouquets?stype=tv")
69
             r = self.call("bouquets?stype=tv")
70
             for item in r["bouquets"]:
70
             for item in r["bouquets"]:
71
                 title = item[1]
71
                 title = item[1]
80
             r2 = self.call(data3)
80
             r2 = self.call(data3)
81
             for item in r["services"]:
81
             for item in r["services"]:
82
                 title = item["servicename"]
82
                 title = item["servicename"]
83
-                data2 = "stream.m3u?ref=%s&name=%s" % (item["servicereference"], title)
83
+                data2 = "stream?ref=%s&name=%s" % (item["servicereference"], title)
84
                 img = self.img
84
                 img = self.img
85
                 desc = title
85
                 desc = title
86
                 for item2 in r2["events"]:
86
                 for item2 in r2["events"]:
110
 
110
 
111
     def is_video(self,data):
111
     def is_video(self,data):
112
         source,data,path,plist,clist,params,qs = self.parse_data(data)
112
         source,data,path,plist,clist,params,qs = self.parse_data(data)
113
-        if clist in ("stream.m3u", "streamcurrent.m3u"):
113
+        if clist in ("stream", "streamcurrent"):
114
             return True
114
             return True
115
         else:
115
         else:
116
             return False
116
             return False
128
         if not self.is_video(data):
128
         if not self.is_video(data):
129
             return []
129
             return []
130
         source,data,path,plist,clist,params,qs = self.parse_data(data)
130
         source,data,path,plist,clist,params,qs = self.parse_data(data)
131
-        if "stream.m3u" in data:
132
-            data3 = data.replace("stream.m3u?ref=","epgservicenow?sRef=")
133
-            r2 = self.call(data3)
134
-            event = r2["events"][0]
135
-        else:
131
+        if "streamcurrent" in data:
136
             data3 = "getcurrent"
132
             data3 = "getcurrent"
137
             r2 = self.call(data3)
133
             r2 = self.call(data3)
138
             event = r2["now"]
134
             event = r2["now"]
135
+            data = data.replace("streamcurrent", "streamcurrent.m3u")
136
+        else:
137
+            data3 = data.replace("stream?ref=","epgservicenow?sRef=")
138
+            r2 = self.call(data3)
139
+            event = r2["events"][0]
140
+            data = data.replace("stream", "stream.m3u")
139
         title, img, desc = self.get_title_desc(event)
141
         title, img, desc = self.get_title_desc(event)
140
 
142
 
141
         r = self._http_request(self.url+data)
143
         r = self._http_request(self.url+data)