Kaynağa Gözat

salabots filmix, tvplay

Ivars 5 yıl önce
ebeveyn
işleme
c02d2639fe
4 değiştirilmiş dosya ile 473 ekleme ve 403 silme
  1. 3
    0
      changelog.md
  2. 381
    363
      project.wpr
  3. 83
    34
      sources/filmix.py
  4. 6
    6
      sources/tvplay.py

+ 3
- 0
changelog.md Dosyayı Görüntüle

@@ -1,3 +1,6 @@
1
+**23.12.2018**
2
+- salabots tvplay, filmix
3
+
1 4
 **05.12.2018**
2 5
 - pielabots ltc (arhīvu bildes, kārtība u.c.)
3 6
 

+ 381
- 363
project.wpr Dosyayı Görüntüle

@@ -92,11 +92,7 @@ debug.breakpoints = {loc('Downloader.py'): {94: (0,
92 92
                None,
93 93
                1,
94 94
                0)},
95
-                     loc('run.py'): {198L: (0,
96
-        None,
97
-        1,
98
-        0),
99
-                                     277L: (0,
95
+                     loc('run.py'): {277L: (0,
100 96
         None,
101 97
         1,
102 98
         0),
@@ -131,10 +127,6 @@ debug.breakpoints = {loc('Downloader.py'): {94: (0,
131 127
                      loc('sources/filmas.py'): {110L: (0,
132 128
         None,
133 129
         1,
134
-        0)},
135
-                     loc('sources/filmix.py'): {77L: (0,
136
-        None,
137
-        1,
138 130
         0)},
139 131
                      loc('sources/filmon.py'): {49L: (0,
140 132
         None,
@@ -183,6 +175,10 @@ debug.breakpoints = {loc('Downloader.py'): {94: (0,
183 175
                      loc('sources/tvdom.py'): {292L: (0,
184 176
         None,
185 177
         1,
178
+        0)},
179
+                     loc('sources/tvplay.py'): {124L: (0,
180
+        None,
181
+        1,
186 182
         0)},
187 183
                      loc('test_sources.py'): {7L: (0,
188 184
         None,
@@ -204,11 +200,11 @@ debug.breakpoints = {loc('Downloader.py'): {94: (0,
204 200
             None,
205 201
             1,
206 202
             0)},
207
-                     loc('unknown:<untitled> #1'): {2: (0,
203
+                     loc('unknown:<untitled> #2'): {10: (0,
208 204
         None,
209 205
         1,
210 206
         0)},
211
-                     loc('unknown:<untitled> #2'): {10: (0,
207
+                     loc('unknown:<untitled> #1'): {2: (0,
212 208
         None,
213 209
         1,
214 210
         0)}}
@@ -683,7 +679,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
683 679
                                    'selected-nodes': [],
684 680
                                    'top-node': [('generic attribute',
685 681
         loc('sources/filmas.py'),
686
-        'c')]},
682
+        'data')]},
687 683
         loc('sources/filmix.py'): {'expanded-nodes': [],
688 684
                                    'selected-nodes': [],
689 685
                                    'top-node': [('generic attribute',
@@ -736,7 +732,9 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
736 732
         loc('sources/tvdom.py'),
737 733
         'data')]},
738 734
         loc('sources/tvplay.py'): {'expanded-nodes': [],
739
-                                   'selected-nodes': [],
735
+                                   'selected-nodes': [[('generic attribute',
736
+        loc('sources/tvplay.py'),
737
+        'data')]],
740 738
                                    'top-node': [('generic attribute',
741 739
         loc('sources/tvplay.py'),
742 740
         'data')]},
@@ -853,8 +851,18 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
853 851
         loc('../../../../../Python27/Lib/site-packages/PIL/Image.py'): {'exp'\
854 852
         'anded-nodes': [],
855 853
         'selected-nodes': [],
856
-        'top-node': None},
857
-        loc('unknown:<untitled> #3'): {'expanded-nodes': [],
854
+        'top-node': [('generic attribute',
855
+                      loc('../../../../../Python27/Lib/site-packages/PIL/Image.py'),
856
+                      'ADAPTIVE')]},
857
+        loc('../../../../../Python27/Lib/site-packages/PIL/ImageTk.py'): {'e'\
858
+        'xpanded-nodes': [],
859
+        'selected-nodes': [[('function def',
860
+                             loc('../../../../../Python27/Lib/site-packages/PIL/ImageTk.py'),
861
+                             '_show')]],
862
+        'top-node': [('class def',
863
+                      loc('../../../../../Python27/Lib/site-packages/PIL/ImageTk.py'),
864
+                      'BitmapImage')]},
865
+        loc('unknown:<untitled> #4'): {'expanded-nodes': [],
858 866
                                        'selected-nodes': [],
859 867
                                        'top-node': None},
860 868
         loc('unknown:<untitled> #6'): {'column-widths': [1.0],
@@ -865,7 +873,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
865 873
                                        'expanded-nodes': [],
866 874
                                        'selected-nodes': [],
867 875
                                        'top-node': None},
868
-        loc('unknown:<untitled> #4'): {'expanded-nodes': [],
876
+        loc('unknown:<untitled> #3'): {'expanded-nodes': [],
869 877
                                        'selected-nodes': [],
870 878
                                        'top-node': None}},
871 879
                                 'browse_mode': u'Current Module',
@@ -895,7 +903,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
895 903
         'current_pages': [2,
896 904
                           0],
897 905
         'notebook_display': 'normal',
898
-        'notebook_percent': 0.32746196957566054,
906
+        'notebook_percent': 0.32265812650120096,
899 907
         'override_title': None,
900 908
         'pagelist': [('debug-breakpoints',
901 909
                       'wide',
@@ -928,10 +936,10 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
928 936
                                        'fRegexFlags': 42,
929 937
                                        'fReplaceText': u'filmix.co',
930 938
                                        'fReverse': False,
931
-                                       'fSearchText': u' for item in r["content"]:',
939
+                                       'fSearchText': u'sorted',
932 940
                                        'fStartPos': 0,
933 941
                                        'fStyle': 'text',
934
-                                       'fWholeWords': False,
942
+                                       'fWholeWords': True,
935 943
                                        'fWrap': True},
936 944
                        'fUIOptions': {'fAutoBackground': True,
937 945
                                       'fFilePrefix': 'short-file',
@@ -1002,54 +1010,47 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1002 1010
         -1,
1003 1011
         -1),
1004 1012
                        'attrib-starts': [],
1005
-                       'first-line': 266L,
1013
+                       'first-line': 128L,
1006 1014
                        'folded-linenos': [],
1007
-                       'history': {u'file:C:/Data/Programming/enigma2/PlayStream2/content/sources/lmt.py': [" "\
1008
-        "re.search('embed.php?salt=([^\"]+)\"', r, re.DOTALL)\n",
1009
-        " re.search('embed.php?salt=([^\"]+)\"', r)\n",
1010
-        " re.search('embed.php?salt=', r)\n",
1011
-        " re.search('embed\\.php\\?salt=([^\"]+)\"', r)\n",
1015
+                       'history': {u'file:C:/Data/Programming/enigma2/PlayStream2/content/sources/filmix.py': ['p'\
1016
+        'rint js[1]\n',
1017
+        'print js[1]["folder"]\n',
1018
+        'print js[1]["folder"][1]\n',
1019
+        'print js[1]["folder"][1]["title"]\n',
1020
+        'items\n',
1021
+        'js[s-1]\n',
1022
+        'len(js[s-1])\n',
1012 1023
         'js\n',
1013
-        'js["title"]\n',
1014
-        'js["data"]["title"]\n',
1015
-        'js["data"]["poster"]\n',
1016
-        'js["data"]["versions"]\n',
1017
-        'js["data"]["versions"].keys()\n',
1018
-        'for v in  js["data"]["versions"].keys(): print vars\n',
1019
-        'for v in  js["data"]["versions"].keys(): print v\n',
1020
-        'js["data"]["versions"][ver]\n',
1021
-        'js["data"]["versions"]["HD"]\n',
1022
-        'data = js["data"]["versions"]["HD"]\n',
1023
-        'sdata = js["data"]["versions"]["HD"]\n',
1024
-        'sdata\n',
1025
-        'sdata[0]\n',
1026
-        'sdata[2]\n',
1027
-        'sdata[1]["scr"]\n',
1028
-        'sdata[1]\n',
1029
-        'sdata[1].keys()\n',
1030
-        'sdata[1]["src"]\n',
1031
-        '    s\n',
1032
-        's["desc"]\n']},
1024
+        'print title\n',
1025
+        'js[s-1]["folder"][i - 1]["title"]\n',
1026
+        'js[s-1]["folder"][i - 1]["title"].print\n',
1027
+        'print js[s-1]["folder"][i - 1]["title"]\n',
1028
+        'len(js)\n',
1029
+        'len(translations)\n',
1030
+        'img\n',
1031
+        'st\n',
1032
+        'm.group(0)\n',
1033
+        'data\n']},
1033 1034
                        'launch-id': None,
1034
-                       'sel-line': 267L,
1035
-                       'sel-line-start': 14574L,
1036
-                       'selection_end': 14574L,
1037
-                       'selection_start': 14574L,
1035
+                       'sel-line': 132L,
1036
+                       'sel-line-start': 12260L,
1037
+                       'selection_end': 12272L,
1038
+                       'selection_start': 12261L,
1038 1039
                        'zoom': 0L}),
1039 1040
                      ('debug-watch',
1040 1041
                       'wide',
1041 1042
                       1,
1042 1043
                       {'node-states': [('eval',
1043
-        u'r2'),
1044
+        u'js'),
1044 1045
                                        ('eval',
1045
-        u'data'),
1046
+        u'data2'),
1046 1047
                                        ('eval',
1047
-        u'theme'),
1048
+        u'title'),
1048 1049
                                        ('eval',
1049 1050
         u'item'),
1050 1051
                                        ('eval',
1051 1052
         u'url')],
1052
-                       'tree-state': {'expanded-nodes': [],
1053
+                       'tree-state': {'expanded-nodes': [(0,)],
1053 1054
                                       'selected-nodes': [(0,)],
1054 1055
                                       'top-node': (0,)}}),
1055 1056
                      ('messages',
@@ -1082,299 +1083,316 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1082 1083
                        'selection_end': 163L,
1083 1084
                        'selection_start': 163L,
1084 1085
                        'zoom': 0L})],
1085
-        'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('run.py'),
1086
-        {'attrib-starts': [('Main',
1087
-                            22),
1088
-                           ('Main.list_action',
1089
-                            106)],
1090
-         'first-line': 94L,
1091
-         'folded-linenos': [],
1092
-         'sel-line': 110L,
1093
-         'sel-line-start': 4515L,
1094
-         'selection_end': 4515L,
1095
-         'selection_start': 4515L,
1086
+        'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('sources/tvplay.py'),
1087
+        {'attrib-starts': [('Source',
1088
+                            32),
1089
+                           ('Source.get_content',
1090
+                            62)],
1091
+         'first-line': 84L,
1092
+         'folded-linenos': [159L],
1093
+         'sel-line': 99L,
1094
+         'sel-line-start': 4495L,
1095
+         'selection_end': 4545L,
1096
+         'selection_start': 4534L,
1096 1097
          'zoom': 0L},
1097
-        1539298436.081],
1098
-        [loc('sources/replay.py'),
1098
+        1545558002.612],
1099
+        [loc('sources/tvplay.py'),
1099 1100
          {'attrib-starts': [('Source',
1100
-                             31),
1101
-                            ('Source.get_streams',
1102
-                             220)],
1103
-          'first-line': 165L,
1104
-          'folded-linenos': [70L,
1105
-                             89L,
1106
-                             143L,
1107
-                             166L,
1108
-                             284L],
1109
-          'sel-line': 221L,
1110
-          'sel-line-start': 11331L,
1111
-          'selection_end': 11331L,
1112
-          'selection_start': 11331L,
1101
+                             32),
1102
+                            ('Source.get_content',
1103
+                             62)],
1104
+          'first-line': 84L,
1105
+          'folded-linenos': [159L],
1106
+          'sel-line': 100L,
1107
+          'sel-line-start': 4552L,
1108
+          'selection_end': 4593L,
1109
+          'selection_start': 4582L,
1113 1110
           'zoom': 0L},
1114
-         1539298448.838],
1115
-        [loc('run.py'),
1116
-         {'attrib-starts': [('Main',
1117
-                             22),
1118
-                            ('Main.list_action',
1119
-                             106)],
1111
+         1545558003.204],
1112
+        [loc('sources/tvplay.py'),
1113
+         {'attrib-starts': [('Source',
1114
+                             32),
1115
+                            ('Source.get_content',
1116
+                             62)],
1120 1117
           'first-line': 0L,
1121
-          'folded-linenos': [],
1122
-          'sel-line': 118L,
1123
-          'sel-line-start': 4754L,
1124
-          'selection_end': 4754L,
1125
-          'selection_start': 4754L,
1118
+          'folded-linenos': [159L],
1119
+          'sel-line': 111L,
1120
+          'sel-line-start': 5003L,
1121
+          'selection_end': 5046L,
1122
+          'selection_start': 5035L,
1126 1123
           'zoom': 0L},
1127
-         1539298521.416],
1128
-        [loc('sources/replay.py'),
1124
+         1545558778.089],
1125
+        [loc('sources/tvplay.py'),
1129 1126
          {'attrib-starts': [('Source',
1130
-                             31),
1131
-                            ('Source.get_streams',
1132
-                             220)],
1133
-          'first-line': 165L,
1134
-          'folded-linenos': [70L,
1135
-                             89L,
1136
-                             143L,
1137
-                             166L,
1138
-                             284L],
1139
-          'sel-line': 221L,
1140
-          'sel-line-start': 11331L,
1141
-          'selection_end': 11331L,
1142
-          'selection_start': 11331L,
1127
+                             32),
1128
+                            ('Source.get_content',
1129
+                             62)],
1130
+          'first-line': 100L,
1131
+          'folded-linenos': [159L],
1132
+          'sel-line': 112L,
1133
+          'sel-line-start': 5049L,
1134
+          'selection_end': 5103L,
1135
+          'selection_start': 5100L,
1143 1136
           'zoom': 0L},
1144
-         1539298544.426],
1145
-        [loc('run.py'),
1146
-         {'attrib-starts': [('Main',
1147
-                             22),
1148
-                            ('Main.list_action',
1149
-                             106)],
1150
-          'first-line': 94L,
1151
-          'folded-linenos': [],
1152
-          'sel-line': 110L,
1153
-          'sel-line-start': 4515L,
1154
-          'selection_end': 4515L,
1155
-          'selection_start': 4515L,
1137
+         1545558778.193],
1138
+        [loc('sources/tvplay.py'),
1139
+         {'attrib-starts': [('Source',
1140
+                             32),
1141
+                            ('Source.get_content',
1142
+                             62)],
1143
+          'first-line': 107L,
1144
+          'folded-linenos': [159L],
1145
+          'sel-line': 116L,
1146
+          'sel-line-start': 5360L,
1147
+          'selection_end': 5401L,
1148
+          'selection_start': 5385L,
1156 1149
           'zoom': 0L},
1157
-         1539298552.821],
1158
-        [loc('sources/replay.py'),
1150
+         1545558783.365],
1151
+        [loc('sources/tvplay.py'),
1159 1152
          {'attrib-starts': [('Source',
1160
-                             31),
1161
-                            ('Source.get_streams',
1162
-                             220)],
1163
-          'first-line': 402L,
1164
-          'folded-linenos': [70L,
1165
-                             89L,
1166
-                             143L,
1167
-                             166L,
1168
-                             284L],
1169
-          'sel-line': 412L,
1170
-          'sel-line-start': 20394L,
1171
-          'selection_end': 20394L,
1172
-          'selection_start': 20394L,
1153
+                             32),
1154
+                            ('Source.__init__',
1155
+                             34)],
1156
+          'first-line': 45L,
1157
+          'folded-linenos': [159L],
1158
+          'sel-line': 50L,
1159
+          'sel-line-start': 1642L,
1160
+          'selection_end': 1666L,
1161
+          'selection_start': 1650L,
1173 1162
           'zoom': 0L},
1174
-         1539298751.21],
1175
-        [loc('run.py'),
1176
-         {'attrib-starts': [('Main',
1177
-                             22),
1178
-                            ('Main.initUI',
1179
-                             47)],
1180
-          'first-line': 62L,
1181
-          'folded-linenos': [],
1182
-          'sel-line': 67L,
1183
-          'sel-line-start': 2534L,
1184
-          'selection_end': 2534L,
1185
-          'selection_start': 2534L,
1163
+         1545558791.827],
1164
+        [loc('sources/tvplay.py'),
1165
+         {'attrib-starts': [('Source',
1166
+                             32),
1167
+                            ('Source.get_content',
1168
+                             62)],
1169
+          'first-line': 104L,
1170
+          'folded-linenos': [159L],
1171
+          'sel-line': 106L,
1172
+          'sel-line-start': 4768L,
1173
+          'selection_end': 4862L,
1174
+          'selection_start': 4850L,
1186 1175
           'zoom': 0L},
1187
-         1539298794.934],
1188
-        [loc('run.py'),
1189
-         {'attrib-starts': [('Main',
1190
-                             22),
1191
-                            ('Main.show_desc',
1192
-                             196)],
1193
-          'first-line': 186L,
1176
+         1545607476.957],
1177
+        [loc('../../../../../Python27/Lib/site-packages/PIL/ImageTk.py'),
1178
+         {'attrib-starts': [('PhotoImage',
1179
+                             69),
1180
+                            ('PhotoImage.paste',
1181
+                             155)],
1182
+          'first-line': 167L,
1194 1183
           'folded-linenos': [],
1195
-          'sel-line': 197L,
1196
-          'sel-line-start': 7793L,
1197
-          'selection_end': 7838L,
1198
-          'selection_start': 7793L,
1184
+          'sel-line': 184L,
1185
+          'sel-line-start': 5644L,
1186
+          'selection_end': 5668L,
1187
+          'selection_start': 5665L,
1199 1188
           'zoom': 0L},
1200
-         1539298803.499],
1201
-        [loc('sources/replay.py'),
1189
+         1545607477.945],
1190
+        [loc('sources/tvplay.py'),
1202 1191
          {'attrib-starts': [('Source',
1203
-                             31),
1204
-                            ('Source.get_streams',
1205
-                             220)],
1206
-          'first-line': 402L,
1207
-          'folded-linenos': [70L,
1208
-                             89L,
1209
-                             143L,
1210
-                             166L,
1211
-                             284L],
1212
-          'sel-line': 412L,
1213
-          'sel-line-start': 20394L,
1214
-          'selection_end': 20394L,
1215
-          'selection_start': 20394L,
1216
-          'zoom': 0L},
1217
-         1539298809.481],
1218
-        [loc('run.py'),
1219
-         {'attrib-starts': [('Main',
1220
-                             22),
1221
-                            ('Main.show_desc',
1222
-                             196)],
1223
-          'first-line': 186L,
1224
-          'folded-linenos': [],
1225
-          'sel-line': 198L,
1226
-          'sel-line-start': 7838L,
1227
-          'selection_end': 7846L,
1228
-          'selection_start': 7846L,
1192
+                             32),
1193
+                            ('Source.get_content',
1194
+                             62)],
1195
+          'first-line': 104L,
1196
+          'folded-linenos': [159L],
1197
+          'sel-line': 106L,
1198
+          'sel-line-start': 4768L,
1199
+          'selection_end': 4862L,
1200
+          'selection_start': 4850L,
1229 1201
           'zoom': 0L},
1230
-         1539298830.092],
1231
-        [loc('sources/replay.py'),
1202
+         1545607481.611],
1203
+        [loc('sources/filmas.py'),
1232 1204
          {'attrib-starts': [('Source',
1233
-                             31),
1205
+                             36),
1234 1206
                             ('Source.get_streams',
1235
-                             220)],
1236
-          'first-line': 165L,
1237
-          'folded-linenos': [70L,
1238
-                             89L,
1239
-                             143L,
1240
-                             166L,
1241
-                             284L],
1242
-          'sel-line': 221L,
1243
-          'sel-line-start': 11331L,
1244
-          'selection_end': 11331L,
1245
-          'selection_start': 11331L,
1246
-          'zoom': 0L},
1247
-         1539298837.49],
1248
-        [loc('run.py'),
1249
-         {'attrib-starts': [('Main',
1250
-                             22),
1251
-                            ('Main.list_action',
1252
-                             106)],
1253
-          'first-line': 105L,
1207
+                             108)],
1208
+          'first-line': 159L,
1254 1209
           'folded-linenos': [],
1255
-          'sel-line': 110L,
1256
-          'sel-line-start': 4515L,
1257
-          'selection_end': 4527L,
1258
-          'selection_start': 4527L,
1210
+          'sel-line': 168L,
1211
+          'sel-line-start': 7362L,
1212
+          'selection_end': 7404L,
1213
+          'selection_start': 7404L,
1259 1214
           'zoom': 0L},
1260
-         1541625173.974],
1261
-        [loc('sources/lmt.py'),
1215
+         1545607482.317],
1216
+        [loc('sources/tvplay.py'),
1262 1217
          {'attrib-starts': [('Source',
1263 1218
                              32),
1264 1219
                             ('Source.get_content',
1265
-                             52)],
1266
-          'first-line': 64L,
1267
-          'folded-linenos': [],
1268
-          'sel-line': 60L,
1269
-          'sel-line-start': 1987L,
1270
-          'selection_end': 2043L,
1271
-          'selection_start': 2043L,
1220
+                             62)],
1221
+          'first-line': 104L,
1222
+          'folded-linenos': [159L],
1223
+          'sel-line': 106L,
1224
+          'sel-line-start': 4768L,
1225
+          'selection_end': 4862L,
1226
+          'selection_start': 4850L,
1272 1227
           'zoom': 0L},
1273
-         1541625181.585],
1274
-        [loc('sources/lmt.py'),
1228
+         1545607483.324],
1229
+        [loc('sources/filmix.py'),
1275 1230
          {'attrib-starts': [('Source',
1276
-                             32),
1231
+                             31),
1232
+                            ('Source.get_content',
1233
+                             56)],
1234
+          'first-line': 142L,
1235
+          'folded-linenos': [179L,
1236
+                             270L],
1237
+          'sel-line': 149L,
1238
+          'sel-line-start': 6166L,
1239
+          'selection_end': 6203L,
1240
+          'selection_start': 6203L,
1241
+          'zoom': 0L},
1242
+         1545609588.231],
1243
+        [loc('sources/filmix.py'),
1244
+         {'attrib-starts': [('Source',
1245
+                             31),
1277 1246
                             ('Source.get_streams',
1278
-                             134)],
1279
-          'first-line': 201L,
1280
-          'folded-linenos': [],
1281
-          'sel-line': 211L,
1282
-          'sel-line-start': 9396L,
1283
-          'selection_end': 9396L,
1284
-          'selection_start': 9396L,
1247
+                             270)],
1248
+          'first-line': 343L,
1249
+          'folded-linenos': [179L],
1250
+          'sel-line': 359L,
1251
+          'sel-line-start': 15961L,
1252
+          'selection_end': 15961L,
1253
+          'selection_start': 15961L,
1285 1254
           'zoom': 0L},
1286
-         1541629753.532],
1255
+         1545611652.114],
1287 1256
         [loc('run.py'),
1288 1257
          {'attrib-starts': [('Main',
1289 1258
                              22),
1290 1259
                             ('Main.play_video',
1291 1260
                              242)],
1292
-          'first-line': 238L,
1261
+          'first-line': 251L,
1293 1262
           'folded-linenos': [],
1294
-          'sel-line': 254L,
1295
-          'sel-line-start': 9998L,
1296
-          'selection_end': 10010L,
1297
-          'selection_start': 10010L,
1263
+          'sel-line': 264L,
1264
+          'sel-line-start': 10425L,
1265
+          'selection_end': 10425L,
1266
+          'selection_start': 10425L,
1298 1267
           'zoom': 0L},
1299
-         1541629764.649],
1300
-        [loc('sources/lmt.py'),
1268
+         1545611733.467],
1269
+        [loc('sources/filmix.py'),
1301 1270
          {'attrib-starts': [('Source',
1302
-                             32),
1271
+                             31),
1272
+                            ('Source.get_content',
1273
+                             56)],
1274
+          'first-line': 99L,
1275
+          'folded-linenos': [179L],
1276
+          'sel-line': 76L,
1277
+          'sel-line-start': 2487L,
1278
+          'selection_end': 2487L,
1279
+          'selection_start': 2487L,
1280
+          'zoom': 0L},
1281
+         1545611946.253],
1282
+        [loc('sources/filmix.py'),
1283
+         {'attrib-starts': [('Source',
1284
+                             31),
1303 1285
                             ('Source.get_streams',
1304
-                             134)],
1305
-          'first-line': 210L,
1306
-          'folded-linenos': [],
1307
-          'sel-line': 220L,
1308
-          'sel-line-start': 9851L,
1309
-          'selection_end': 9863L,
1310
-          'selection_start': 9863L,
1286
+                             270)],
1287
+          'first-line': 298L,
1288
+          'folded-linenos': [321L],
1289
+          'sel-line': 318L,
1290
+          'sel-line-start': 14037L,
1291
+          'selection_end': 14037L,
1292
+          'selection_start': 14037L,
1311 1293
           'zoom': 0L},
1312
-         1541630517.409],
1313
-        [loc('run.py'),
1314
-         {'attrib-starts': [('Main',
1315
-                             22),
1316
-                            ('Main.play_video',
1317
-                             242)],
1318
-          'first-line': 238L,
1319
-          'folded-linenos': [],
1320
-          'sel-line': 254L,
1321
-          'sel-line-start': 9998L,
1322
-          'selection_end': 10010L,
1323
-          'selection_start': 10010L,
1294
+         1545613448.203],
1295
+        [loc('sources/ltc.py'),
1296
+         {'attrib-starts': [('Source',
1297
+                             26),
1298
+                            ('Source.get_stream_url2',
1299
+                             984)],
1300
+          'first-line': 66L,
1301
+          'folded-linenos': [132L,
1302
+                             161L,
1303
+                             221L,
1304
+                             232L,
1305
+                             258L,
1306
+                             277L,
1307
+                             296L,
1308
+                             320L,
1309
+                             350L,
1310
+                             351L,
1311
+                             399L,
1312
+                             412L,
1313
+                             532L],
1314
+          'sel-line': 1004L,
1315
+          'sel-line-start': 52035L,
1316
+          'selection_end': 52085L,
1317
+          'selection_start': 52085L,
1324 1318
           'zoom': 0L},
1325
-         1541630539.167],
1326
-        [loc('sources/lmt.py'),
1319
+         1545613550.475],
1320
+        [loc('sources/ltc.py'),
1327 1321
          {'attrib-starts': [('Source',
1328
-                             32),
1329
-                            ('Source.get_streams',
1330
-                             134)],
1331
-          'first-line': 210L,
1332
-          'folded-linenos': [],
1333
-          'sel-line': 220L,
1334
-          'sel-line-start': 9851L,
1335
-          'selection_end': 9851L,
1336
-          'selection_start': 9851L,
1322
+                             26),
1323
+                            ('Source.get_stream_url2',
1324
+                             984)],
1325
+          'first-line': 1008L,
1326
+          'folded-linenos': [132L,
1327
+                             161L,
1328
+                             221L,
1329
+                             232L,
1330
+                             258L,
1331
+                             277L,
1332
+                             296L,
1333
+                             320L,
1334
+                             350L,
1335
+                             351L,
1336
+                             399L,
1337
+                             412L,
1338
+                             532L],
1339
+          'sel-line': 1018L,
1340
+          'sel-line-start': 52714L,
1341
+          'selection_end': 52739L,
1342
+          'selection_start': 52733L,
1337 1343
           'zoom': 0L},
1338
-         1541630562.637],
1339
-        [loc('ContentSources.py'),
1340
-         {'attrib-starts': [('ContentSources',
1341
-                             16),
1342
-                            ('ContentSources.get_streams',
1343
-                             96)],
1344
-          'first-line': 104L,
1345
-          'folded-linenos': [],
1346
-          'sel-line': 115L,
1347
-          'sel-line-start': 4877L,
1348
-          'selection_end': 4877L,
1349
-          'selection_start': 4877L,
1344
+         1545613552.544],
1345
+        [loc('sources/ltc.py'),
1346
+         {'attrib-starts': [('Source',
1347
+                             26),
1348
+                            ('Source.get_streams',
1349
+                             572)],
1350
+          'first-line': 637L,
1351
+          'folded-linenos': [132L,
1352
+                             161L,
1353
+                             221L,
1354
+                             232L,
1355
+                             258L,
1356
+                             277L,
1357
+                             296L,
1358
+                             320L,
1359
+                             350L,
1360
+                             351L,
1361
+                             399L,
1362
+                             412L,
1363
+                             532L],
1364
+          'sel-line': 646L,
1365
+          'sel-line-start': 37498L,
1366
+          'selection_end': 37506L,
1367
+          'selection_start': 37506L,
1350 1368
           'zoom': 0L},
1351
-         1541630579.16],
1352
-        [loc('run.py'),
1353
-         {'attrib-starts': [('Main',
1354
-                             22),
1355
-                            ('Main.play_video',
1356
-                             242)],
1357
-          'first-line': 248L,
1369
+         1545613598.407],
1370
+        [loc('sources/filmix.py'),
1371
+         {'attrib-starts': [('Source',
1372
+                             31),
1373
+                            ('Source.get_streams',
1374
+                             270)],
1375
+          'first-line': 349L,
1358 1376
           'folded-linenos': [],
1359
-          'sel-line': 260L,
1360
-          'sel-line-start': 10228L,
1361
-          'selection_end': 10262L,
1362
-          'selection_start': 10262L,
1377
+          'sel-line': 351L,
1378
+          'sel-line-start': 15581L,
1379
+          'selection_end': 15640L,
1380
+          'selection_start': 15640L,
1363 1381
           'zoom': 0L},
1364
-         1541630605.709]],
1382
+         1545613904.974]],
1365 1383
         20),
1366
-        'current-loc': loc('run.py'),
1384
+        'current-loc': loc('sources/filmix.py'),
1367 1385
         'editor-state-list': [(loc('run.py'),
1368 1386
                                {'attrib-starts': [('Main',
1369 1387
         22),
1370
-        ('Main.show_desc',
1371
-         196)],
1372
-                                'first-line': 186L,
1388
+        ('Main.play_video',
1389
+         242)],
1390
+                                'first-line': 251L,
1373 1391
                                 'folded-linenos': [],
1374
-                                'sel-line': 197L,
1375
-                                'sel-line-start': 7793L,
1376
-                                'selection_end': 7793L,
1377
-                                'selection_start': 7793L,
1392
+                                'sel-line': 264L,
1393
+                                'sel-line-start': 10425L,
1394
+                                'selection_end': 10425L,
1395
+                                'selection_start': 10425L,
1378 1396
                                 'zoom': 0L}),
1379 1397
                               (loc('util.py'),
1380 1398
                                {'attrib-starts': [('unescape',
@@ -1392,9 +1410,9 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1392 1410
                               (loc('sources/ltc.py'),
1393 1411
                                {'attrib-starts': [('Source',
1394 1412
         26),
1395
-        ('Source.get_stream_url2',
1396
-         978)],
1397
-                                'first-line': 989L,
1413
+        ('Source.get_streams',
1414
+         572)],
1415
+                                'first-line': 637L,
1398 1416
                                 'folded-linenos': [132L,
1399 1417
         161L,
1400 1418
         221L,
@@ -1408,10 +1426,10 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1408 1426
         399L,
1409 1427
         412L,
1410 1428
         532L],
1411
-                                'sel-line': 998L,
1412
-                                'sel-line-start': 51732L,
1413
-                                'selection_end': 51782L,
1414
-                                'selection_start': 51782L,
1429
+                                'sel-line': 646L,
1430
+                                'sel-line-start': 37498L,
1431
+                                'selection_end': 37506L,
1432
+                                'selection_start': 37506L,
1415 1433
                                 'zoom': 0L}),
1416 1434
                               (loc('sources/replay.py'),
1417 1435
                                {'attrib-starts': [('Source',
@@ -1430,13 +1448,16 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1430 1448
                                 'selection_start': 11331L,
1431 1449
                                 'zoom': 0L}),
1432 1450
                               (loc('sources/tvplay.py'),
1433
-                               {'attrib-starts': [],
1434
-                                'first-line': 0L,
1451
+                               {'attrib-starts': [('Source',
1452
+        32),
1453
+        ('Source.get_content',
1454
+         62)],
1455
+                                'first-line': 104L,
1435 1456
                                 'folded-linenos': [159L],
1436
-                                'sel-line': 14L,
1437
-                                'sel-line-start': 421L,
1438
-                                'selection_end': 431L,
1439
-                                'selection_start': 431L,
1457
+                                'sel-line': 106L,
1458
+                                'sel-line-start': 4768L,
1459
+                                'selection_end': 4862L,
1460
+                                'selection_start': 4850L,
1440 1461
                                 'zoom': 0L}),
1441 1462
                               (loc('sources/euronews.py'),
1442 1463
                                {'attrib-starts': [('Source',
@@ -1474,26 +1495,14 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1474 1495
                               (loc('sources/filmix.py'),
1475 1496
                                {'attrib-starts': [('Source',
1476 1497
         31),
1477
-        ('Source.process_list',
1478
-         191)],
1479
-                                'first-line': 189L,
1480
-                                'folded-linenos': [],
1481
-                                'sel-line': 204L,
1482
-                                'sel-line-start': 9180L,
1483
-                                'selection_end': 9216L,
1484
-                                'selection_start': 9216L,
1485
-                                'zoom': 0L}),
1486
-                              (loc('sources/filmas.py'),
1487
-                               {'attrib-starts': [('Source',
1488
-        36),
1489 1498
         ('Source.get_streams',
1490
-         108)],
1491
-                                'first-line': 159L,
1499
+         270)],
1500
+                                'first-line': 275L,
1492 1501
                                 'folded-linenos': [],
1493
-                                'sel-line': 169L,
1494
-                                'sel-line-start': 7404L,
1495
-                                'selection_end': 7404L,
1496
-                                'selection_start': 7404L,
1502
+                                'sel-line': 280L,
1503
+                                'sel-line-start': 12065L,
1504
+                                'selection_end': 12065L,
1505
+                                'selection_start': 12065L,
1497 1506
                                 'zoom': 0L}),
1498 1507
                               (loc('../../../../../Python27/Lib/site-packages/PIL/Image.py'),
1499 1508
                                {'attrib-starts': [],
@@ -1539,22 +1548,21 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1539 1548
          loc('sources/config.py'),
1540 1549
          loc('changelog.md'),
1541 1550
          loc('sources/filmix.py'),
1542
-         loc('sources/filmas.py'),
1543 1551
          loc('../../../../../Python27/Lib/site-packages/PIL/Image.py'),
1544 1552
          loc('sources/lmt.py'),
1545 1553
          loc('ContentSources.py')]),
1546
-                               'open_files': [u'changelog.md',
1554
+                               'open_files': [u'ContentSources.py',
1555
+        u'changelog.md',
1547 1556
         u'sources/config.py',
1548 1557
         u'sources/euronews.py',
1549
-        u'sources/filmas.py',
1550
-        u'sources/filmix.py',
1551
-        u'sources/ltc.py',
1558
+        u'sources/lmt.py',
1552 1559
         u'sources/replay.py',
1553
-        u'sources/tvplay.py',
1554 1560
         u'util.py',
1555 1561
         u'../../../../../Python27/Lib/site-packages/PIL/Image.py',
1556
-        u'sources/lmt.py',
1557
-        u'run.py']},
1562
+        u'sources/tvplay.py',
1563
+        u'run.py',
1564
+        u'sources/ltc.py',
1565
+        u'sources/filmix.py']},
1558 1566
         'saved_notebook_display': None,
1559 1567
         'split_percents': {0: 0.5388225255972696},
1560 1568
         'splits': 2,
@@ -1565,21 +1573,19 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1565 1573
                  'splits': 2,
1566 1574
                  'tab_location': 'left',
1567 1575
                  'user_data': {}},
1568
-        'window-alloc': (167,
1576
+        'window-alloc': (128,
1569 1577
                          0,
1570
-                         2393,
1578
+                         2432,
1571 1579
                          1440)}]}
1572
-guimgr.recent-documents = [loc('run.py'),
1573
-                           loc('ContentSources.py'),
1574
-                           loc('sources/lmt.py'),
1580
+guimgr.recent-documents = [loc('sources/filmix.py'),
1581
+                           loc('sources/ltc.py'),
1582
+                           loc('run.py'),
1583
+                           loc('sources/tvplay.py'),
1575 1584
                            loc('../../../../../Python27/Lib/site-packages/PIL/Image.py'),
1585
+                           loc('sources/lmt.py'),
1576 1586
                            loc('sources/replay.py'),
1577
-                           loc('sources/ltc.py'),
1578 1587
                            loc('util.py'),
1579
-                           loc('sources/tvplay.py'),
1580 1588
                            loc('sources/euronews.py'),
1581
-                           loc('sources/filmix.py'),
1582
-                           loc('sources/filmas.py'),
1583 1589
                            loc('changelog.md'),
1584 1590
                            loc('sources/config.py')]
1585 1591
 guimgr.visual-state = {loc('../../../Python25/Lib/BeautifulSoup.py'): {'attr'\
@@ -1888,14 +1894,14 @@ guimgr.visual-state = {loc('../../../Python25/Lib/BeautifulSoup.py'): {'attr'\
1888 1894
         'zoom': 0L},
1889 1895
                        loc('sources/filmas.py'): {'attrib-starts': [('Source',
1890 1896
         36),
1891
-        ('Source.__init__',
1892
-         38)],
1893
-        'first-line': 42L,
1897
+        ('Source.get_streams',
1898
+         108)],
1899
+        'first-line': 159L,
1894 1900
         'folded-linenos': [],
1895
-        'sel-line': 44L,
1896
-        'sel-line-start': 1330L,
1897
-        'selection_end': 1369L,
1898
-        'selection_start': 1369L,
1901
+        'sel-line': 168L,
1902
+        'sel-line-start': 7362L,
1903
+        'selection_end': 7404L,
1904
+        'selection_start': 7404L,
1899 1905
         'zoom': 0L},
1900 1906
                        loc('sources/filmix.py'): {'attrib-starts': [('Source',
1901 1907
         31),
@@ -2134,6 +2140,18 @@ guimgr.visual-state = {loc('../../../Python25/Lib/BeautifulSoup.py'): {'attr'\
2134 2140
         'sel-line-start': 1389L,
2135 2141
         'selection_end': 1434L,
2136 2142
         'selection_start': 1434L,
2143
+        'zoom': 0L},
2144
+                       loc('../../../../../Python27/Lib/site-packages/PIL/ImageTk.py'): {'a'\
2145
+        'ttrib-starts': [('PhotoImage',
2146
+                          69),
2147
+                         ('PhotoImage.paste',
2148
+                          155)],
2149
+        'first-line': 167L,
2150
+        'folded-linenos': [],
2151
+        'sel-line': 184L,
2152
+        'sel-line-start': 5644L,
2153
+        'selection_end': 5668L,
2154
+        'selection_start': 5665L,
2137 2155
         'zoom': 0L},
2138 2156
                        loc('../../../../../Python27/Lib/site-packages/requests/adapters.py'): {'a'\
2139 2157
         'ttrib-starts': [('HTTPAdapter',
@@ -2220,7 +2238,14 @@ search.replace-history = [u'filmix.co',
2220 2238
                           u'https://replay.lsm.lv',
2221 2239
                           u'www.shortcut.lv',
2222 2240
                           u'shortcut.lv']
2223
-search.search-history = [u' for item in r["content"]:',
2241
+search.search-history = [u'sorted',
2242
+                         u'self.kategorijas',
2243
+                         u'kategorijas',
2244
+                         u'"playlist"',
2245
+                         u'translations',
2246
+                         u'134',
2247
+                         u'decode_direct_media_url',
2248
+                         u' for item in r["content"]:',
2224 2249
                          u'sort=',
2225 2250
                          u'raidijumi/kategorijas',
2226 2251
                          u'tvSeries/category/id/33?type=tvseries&',
@@ -2232,14 +2257,7 @@ search.search-history = [u' for item in r["content"]:',
2232 2257
                          u'title =',
2233 2258
                          u'title',
2234 2259
                          u'nfo',
2235
-                         u'"nfo"',
2236
-                         u'datetime',
2237
-                         u'offset',
2238
-                         u'filmix\\.m',
2239
-                         u'filmix.me',
2240
-                         u'1.4',
2241
-                         u'1.3',
2242
-                         u'img =']
2260
+                         u'"nfo"']
2243 2261
 testing.stored-results = (1,
2244 2262
                           [],
2245 2263
                           {})

+ 83
- 34
sources/filmix.py Dosyayı Görüntüle

@@ -131,7 +131,13 @@ Cookie: FILMIXNET=%s;
131 131
             m = re.search(r"meta_key = \['(\w+)', '(\w+)', '(\w+)'\]", r, re.IGNORECASE)
132 132
             key = m.group(3) if m else ""
133 133
             js = self.get_movie_info(vid,key)
134
-            translations = js["message"]["translations"]["html5"]
134
+            #translations = js["message"]["translations"]["html5"]
135
+            if "html5" in  js["message"]["translations"]:
136
+                translations = js["message"]["translations"]["html5"]
137
+            else:
138
+                translations = js["message"]["translations"]
139
+                translations = js["message"]["translations"]["video"]
140
+
135 141
             items = []
136 142
             for pl  in translations:
137 143
                 if translations[pl].startswith("http"):
@@ -139,29 +145,30 @@ Cookie: FILMIXNET=%s;
139 145
                 pl_link = translations[pl]
140 146
                 lang = pl.encode("utf8")
141 147
                 pl_link = self.decode_direct_media_url(pl_link)
142
-                js = self._http_request(pl_link)
143
-                js = self.decode_direct_media_url(js)
144
-                js = json.loads(js)
145
-                if "s" in qs:
148
+                stxt = self._http_request(pl_link)
149
+                stxt = self.decode_direct_media_url(stxt)
150
+                js = json.loads(stxt)
151
+                if "s" in qs:  # season, enumerate episodes
146 152
                     s = int(qs["s"])
147
-                    if s > len(js["playlist"]): continue
148
-                    for i,ep in enumerate(js["playlist"][s-1]["playlist"]):
149
-                        title = title0+" - "+js["playlist"][s-1]["playlist"][i]["comment"].encode("utf8")
150
-                        serie = js["playlist"][s-1]["playlist"][i]["comment"].encode("utf8")
153
+                    if s > len(js): continue
154
+                    for i,ep in enumerate(js[s-1]["folder"]):
155
+                        title2 = js[s-1]["folder"][i]["title"].encode("utf8")
156
+                        title = title0+" - "+ title2
157
+                        title_season = js[s-1]["title"].encode("utf8")
151 158
                         data2 = data+"&e=%s"%(i+1)
152
-                        desc = serie +"\n"+desc0
159
+                        desc = title2 +"\n"+desc0
153 160
                         if data2 not in items:
154 161
                             items.append(data2)
155 162
                             content.append((title,self.name+"::"+data2,img,desc))
156
-                else:
157
-                    for i,ep in enumerate(js["playlist"]):
158
-                        title = title0 +" - "+js["playlist"][i]["comment"].encode("utf8")
159
-                        serie = js["playlist"][i]["comment"].encode("utf8")
160
-                        if "file" in ep and ep["file"]:
163
+                else:  # enumerate seasons
164
+                    for i, se in enumerate(js):
165
+                        title2 = se["title"].encode("utf8")
166
+                        title = title0 +" - " + title2
167
+                        if "file" in se and se["file"]:
161 168
                             data2 = data+"?e=%s"%(i+1)
162 169
                         else:
163 170
                             data2 = data+"?s=%s"%(i+1)
164
-                        desc = serie +"\n"+desc0
171
+                        desc = title2 +"\n"+desc0
165 172
                         if data2 not in items:
166 173
                             items.append(data2)
167 174
                             content.append((title,self.name+"::"+data2,img,desc))
@@ -270,13 +277,16 @@ Cookie: FILMIXNET=%s;
270 277
             return []
271 278
         streams = []
272 279
         r = r.decode("cp1251").encode("utf8")
273
-        title = title0 = util.unescape(re.search("titlePlayer = '([^']+)'", r, re.DOTALL).group(1))
274
-        m = re.search('<meta itemprop="thumbnailUrl" content="([^"]+)',r,re.DOTALL)
275
-        img = m.group(1) if m else self.img
276
-        m = re.search('<meta itemprop="duration" content="([^"]+)" />', r, re.DOTALL)
277
-        duration = "(%s)"%m.group(1) if m else ""
278
-        m = re.search('<p itemprop="description"[^>]+>([^<]+)<', r, re.DOTALL)
279
-        desc = desc0 =  util.unescape(m.group(1).strip()) if m else ""
280
+        try:
281
+            title = title0 = util.unescape(re.search("titlePlayer = '([^']+)'", r, re.DOTALL).group(1))
282
+            m = re.search('<meta itemprop="thumbnailUrl" content="([^"]+)',r,re.DOTALL)
283
+            img = m.group(1) if m else self.img
284
+            m = re.search('<meta itemprop="duration" content="([^"]+)" />', r, re.DOTALL)
285
+            duration = "(%s)"%m.group(1) if m else ""
286
+            m = re.search('<p itemprop="description"[^>]+>([^<]+)<', r, re.DOTALL)
287
+            desc = desc0 =  util.unescape(m.group(1).strip()) if m else ""
288
+        except:
289
+            raise Exception("No stream found")
280 290
         #m = re.search('itemprop="contentUrl" content="(.+?)"', r, re.IGNORECASE | re.DOTALL)
281 291
         #if not m:
282 292
         #    raise Exception("Can not find video link")
@@ -287,7 +297,11 @@ Cookie: FILMIXNET=%s;
287 297
         key = m.group(3) if m else ""
288 298
         js =  self.get_movie_info(vid, key)
289 299
         series = True if js["message"]["translations"]["pl"] == "yes" else False
290
-        translations = js["message"]["translations"]["html5"]
300
+        if "html5" in  js["message"]["translations"]:
301
+            translations = js["message"]["translations"]["html5"]
302
+        else:
303
+            translations = js["message"]["translations"]
304
+            translations = js["message"]["translations"]["video"]
291 305
 
292 306
         if not series : # Filma
293 307
             for pl in translations:
@@ -305,8 +319,10 @@ Cookie: FILMIXNET=%s;
305 319
                     stream["name"]= title
306 320
                     stream["desc"]=desc
307 321
                     stream["img"] = img
322
+                    m = re.search("\d+", st[0])
323
+                    stream["order"] = int(m.group(0)) if m else 0
308 324
                     streams.append(stream)
309
-            return streams
325
+            #return streams
310 326
 
311 327
         else: # Seriāls
312 328
             for pl in translations:
@@ -320,7 +336,7 @@ Cookie: FILMIXNET=%s;
320 336
                 js = self._http_request(pl_link)
321 337
                 js = self.decode_direct_media_url(js)
322 338
                 js = json.loads(js)
323
-                playlist =  js["playlist"]
339
+                playlist =  js
324 340
                 if "e" in qs:
325 341
                     if "s" in qs:
326 342
                         s = int(qs["s"])
@@ -328,10 +344,10 @@ Cookie: FILMIXNET=%s;
328 344
                         s = None
329 345
                     e = int(qs["e"])
330 346
                     if s: # sezona + epizode
331
-                        if s > len(js["playlist"]) or e > len(js["playlist"][s-1]["playlist"]): continue
332
-                        serie = js["playlist"][s-1]["playlist"][e-1]["comment"].encode("utf8")
333
-                        title = title0+" - "+ serie
334
-                        url0 = js["playlist"][s-1]["playlist"][e-1]["file"].encode("utf8")
347
+                        if s > len(js) or e > len(js[s-1]["folder"]): continue
348
+                        title2 = js[s-1]["folder"][e-1]["title"].encode("utf8")
349
+                        title = title0+" - " + title2
350
+                        url0 = js[s-1]["folder"][e-1]["file"].encode("utf8")
335 351
                     else: # tikai epizode, nav sezonas
336 352
                         if e > len(js["playlist"]): continue
337 353
                         title = title0 +" - "+js["playlist"][e-1]["comment"].encode("utf8")
@@ -344,9 +360,14 @@ Cookie: FILMIXNET=%s;
344 360
                         stream["lang"]=lang
345 361
                         stream["quality"]=st[0]
346 362
                         stream["name"]= title
363
+                        stream["img"] = img
347 364
                         stream["desc"]=desc
365
+                        m = re.search("\d+", st[0])
366
+                        stream["order"] = int(m.group(0)) if m else 0
348 367
                         streams.append(stream)
349
-            return streams
368
+
369
+        streams = sorted(streams,key=lambda item: item["order"],reverse=True)
370
+        return streams
350 371
 
351 372
     def call(self, data,params=None,headers=None,lang=""):
352 373
         if not headers: headers = self.headers
@@ -391,6 +412,15 @@ Cookie: FILMIXNET=%s;
391 412
             encoded_url = encoded_url.replace('___', b)
392 413
         return base64.b64decode(encoded_url)
393 414
 
415
+    def decode_base64_2(self, encoded_url):
416
+        tokens = ("//Y2VyY2EudHJvdmEuc2FnZ2V6emE=", "//c2ljYXJpby4yMi5tb3ZpZXM=", "//a2lub2NvdmVyLnc5OC5uamJo")
417
+        clean_encoded_url = encoded_url[2:].replace("\/","/")
418
+
419
+        for token in tokens:
420
+            clean_encoded_url = clean_encoded_url.replace(token, "")
421
+
422
+        return base64.b64decode(clean_encoded_url)
423
+
394 424
     def decode_unicode(self, encoded_url):
395 425
         from itertools import izip_longest
396 426
         def grouper(n, iterable, fillvalue=None):
@@ -408,14 +438,16 @@ Cookie: FILMIXNET=%s;
408 438
 
409 439
         try:
410 440
             if encoded_url.find('#') != -1:
411
-                return self.decode_unicode(encoded_url)
441
+                if encoded_url[:2] == '#2':
442
+                    return self.decode_base64_2(encoded_url)
443
+                else:
444
+                    return self.decode_unicode(encoded_url)
412 445
             else:
413 446
                 return self.decode_base64(encoded_url)
414 447
         except:
415 448
             return False
416 449
 
417 450
 
418
-
419 451
     def decode_uppod_text(self, text):
420 452
         Client_codec_a = ["l", "u", "T", "D", "Q", "H", "0", "3", "G", "1", "f", "M", "p", "U", "a", "I", "6", "k", "d", "s", "b", "W", "5", "e", "y", "="]
421 453
         Client_codec_b = ["w", "g", "i", "Z", "c", "R", "z", "v", "x", "n", "N", "2", "8", "J", "X", "t", "9", "V", "7", "4", "B", "m", "Y", "o", "L", "h"]
@@ -430,7 +462,8 @@ Cookie: FILMIXNET=%s;
430 462
         print result
431 463
         return result
432 464
 
433
-    def get_streams2(self,url0):
465
+    def get_streams2_(self,url0):
466
+        # Old version
434 467
         m = re.search("\[([\d\w,]+)\]",url0)
435 468
         if not m:
436 469
             return [("?",url0)]
@@ -443,6 +476,22 @@ Cookie: FILMIXNET=%s;
443 476
             streams.append((res,url))
444 477
         return streams
445 478
 
479
+    def get_streams2(self,url0):
480
+        m = re.search("\[([\d\w]+)\]",url0)
481
+        if not m:
482
+            return [("?",url0)]
483
+        streams=[]
484
+        for st in url0.split(","):
485
+            if not st: continue
486
+            m = re.search(r"\[([\d\w]+)\]", st)
487
+            if not m:
488
+                continue
489
+            res =  m.group(1)
490
+            if res in ["1080p"]: continue #TODO fullhd only in PRO+ version
491
+            url=st.replace(m.group(0), "")
492
+            streams.append((res,url))
493
+        return streams
494
+
446 495
 
447 496
 if __name__ == "__main__":
448 497
 

+ 6
- 6
sources/tvplay.py Dosyayı Görüntüle

@@ -79,19 +79,19 @@ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
79 79
 
80 80
         elif clist in ("meklet"):
81 81
             term = plist[1]
82
-            data = "tvplay::asset/search?size=30&page=0&f_title.title=%s&f_country=LV&f_metadata.contentType=EPISODE" % term
82
+            data = "tvplay::asset/search?size=30&page=0&f_title.title=%s&f_country=LV&f_metadata.contentType=EPISODE&f_country=LV" % term
83 83
             return self.get_content(data)
84 84
 
85 85
         elif clist in ("tiesraides"):
86
-            data = "tvplay::asset/search?size=30&page=0&f_metadata.contentType=LIVE"
86
+            data = "tvplay::asset/search?size=30&page=0&f_metadata.contentType=LIVE&f_country=LV"
87 87
             return self.get_content(data)
88 88
 
89 89
         elif clist == "jaunakais":
90 90
             if plist[1] == "epizodes":
91
-                data = "tvplay::asset/search?f_title.categories=15004&size=30&page=0&f_metadata.contentType=EPISODE"
91
+                data = "tvplay::asset/search?f_title.categories=15004&size=30&page=0&f_metadata.contentType=EPISODE&f_country=LV"
92 92
                 return self.get_content(data)
93 93
             elif plist[1] == "klipi":
94
-                data = "tvplay::asset/search?f_title.categories=15004&size=30&page=0&f_metadata.contentType=CLIP"
94
+                data = "tvplay::asset/search?f_title.categories=15004&size=30&page=0&f_metadata.contentType=CLIP&f_country=LV"
95 95
                 return self.get_content(data)
96 96
             elif plist[1] == "kategorijas":
97 97
                 for kat in self.kategorijas:
@@ -104,7 +104,7 @@ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
104 104
                         break
105 105
                 else:
106 106
                     return content
107
-                data = "tvplay::asset/search?f_title.categories=%s&size=30&page=0" % kat_num
107
+                data = "tvplay::asset/search?f_title.categories=%s&size=30&page=0&f_country=LV" % kat_num
108 108
                 return self.get_content(data)
109 109
 
110 110
         elif clist == "raidijumi":
@@ -120,7 +120,7 @@ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
120 120
                         break
121 121
                 else:
122 122
                     return content
123
-                data = "tvplay::tvSeries/category/id/%s?type=tvseries&size=500&sort=&descending=true" % kat_num
123
+                data = "tvplay::tvSeries/category/id/%s?type=tvseries&size=500&sort=&descending=true&tenantId=2" % kat_num
124 124
                 return self.get_content(data)
125 125
 
126 126
         elif path == "asset/search":