Pārlūkot izejas kodu

0.6i, salabots filmix (sērijas)

Ivars 7 gadus atpakaļ
vecāks
revīzija
9e7c2f88eb

+ 1
- 0
ContentSources.py Parādīt failu

@@ -231,6 +231,7 @@ if __name__ == "__main__":
231 231
             content = sources.get_content(cur[1])
232 232
         except Exception as e:
233 233
             print unicode(e)
234
+            traceback.print_exc()
234 235
             raw_input("Continue?")
235 236
 
236 237
 

+ 1
- 1
PlayStream.py Parādīt failu

@@ -6,7 +6,7 @@
6 6
 # Used fragments of code from enigma2-plugin-tv3play by Taapat (https://github.com/Taapat/enigma2-plugin-tv3play)
7 7
 #
8 8
 
9
-__version__ = "0.6h"
9
+__version__ = "0.6i"
10 10
 __id__ = "playstream"
11 11
 __title__ = "PlayStream"
12 12
 __author__ = "ivars777@gmail.com"

+ 3
- 0
changelog.md Parādīt failu

@@ -1,3 +1,6 @@
1
+**0.6i** (22.03.2017)
2
+- salabots filmix (nerādīja sērijas)
3
+
1 4
 **0.6h** (19.03.2017):
2 5
 - update pārbaude uzsākot darbu
3 6
 - versijas numura  iekļaušana kodā, parādīsana Config logā

Binārs
release/enigma2-plugin-extensions-playstream_0.6i.ipk Parādīt failu


+ 12
- 2
sources/filmix.py Parādīt failu

@@ -105,8 +105,18 @@ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
105 105
             desc = desc0 =  util.unescape(m.group(1).strip()) if m else ""
106 106
             vid = plist[-1]
107 107
             js = self.get_movie_info(vid)
108
-            pl_link = js["message"]["translations"]["flash"].values()[0] # TODO process several players
109
-            pl_link = self.decode_uppod_text(pl_link)
108
+            translations = js["message"]["translations"]["flash"]
109
+            for pl  in translations:
110
+                if translations[pl].startswith("http"):
111
+                    continue
112
+                pl_link = translations[pl]
113
+                break
114
+            else:
115
+                raise Exception("No episodes list found!")
116
+            #pl_link = js["message"]["translations"]["flash"].values()[0]
117
+            #  TODO process several players, currently taking the first
118
+            if not pl_link.startswith("http"):
119
+                pl_link = self.decode_uppod_text(pl_link)
110 120
             js = self._http_request(pl_link)
111 121
             js = self.decode_uppod_text(js)
112 122
             js = json.loads(js)