Ivars преди 5 години
родител
ревизия
976b221cb1
променени са 5 файла, в които са добавени 536 реда и са изтрити 350 реда
  1. Двоични данни
      picons/xtv.png
  2. 392
    349
      project.wpr
  3. 1
    0
      sources/play24.py
  4. 1
    1
      sources/streams.cfg
  5. 142
    0
      sources/xtv.py

Двоични данни
picons/xtv.png Целия файл


+ 392
- 349
project.wpr Целия файл

@@ -200,11 +200,11 @@ debug.breakpoints = {loc('Downloader.py'): {94: (0,
200 200
             None,
201 201
             1,
202 202
             0)},
203
-                     loc('unknown:<untitled> #2'): {10: (0,
203
+                     loc('unknown:<untitled> #1'): {10: (0,
204 204
         None,
205 205
         1,
206 206
         0)},
207
-                     loc('unknown:<untitled> #1'): {2: (0,
207
+                     loc('unknown:<untitled> #2'): {2: (0,
208 208
         None,
209 209
         1,
210 210
         0)}}
@@ -305,10 +305,10 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
305 305
         'type': 'dock',
306 306
         'view': {'area': 'tall',
307 307
                  'constraint': None,
308
-                 'current_pages': [2,
308
+                 'current_pages': [0,
309 309
                                    0],
310 310
                  'full-screen': False,
311
-                 'notebook_display': 'normal',
311
+                 'notebook_display': 'tabs only',
312 312
                  'notebook_percent': 0.17992831541218635,
313 313
                  'override_title': None,
314 314
                  'pagelist': [('project',
@@ -318,8 +318,9 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
318 318
         'list-files-first': 0,
319 319
         'tree-states': {'deep': {'expanded-nodes': [(6,)],
320 320
                                  'selected-nodes': [(6,
321
-        15)],
322
-                                 'top-node': (0,)}},
321
+        22)],
322
+                                 'top-node': (6,
323
+        12)}},
323 324
         'tree-style': 'deep'}}),
324 325
                               ('snippets',
325 326
                                'tall',
@@ -681,7 +682,9 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
681 682
         loc('sources/filmas.py'),
682 683
         'data')]},
683 684
         loc('sources/filmix.py'): {'expanded-nodes': [],
684
-                                   'selected-nodes': [],
685
+                                   'selected-nodes': [[('generic attribute',
686
+        loc('sources/filmix.py'),
687
+        'data')]],
685 688
                                    'top-node': [('generic attribute',
686 689
         loc('sources/filmix.py'),
687 690
         'data')]},
@@ -738,6 +741,11 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
738 741
                                    'top-node': [('generic attribute',
739 742
         loc('sources/tvplay.py'),
740 743
         'data')]},
744
+        loc('sources/xtv.py'): {'expanded-nodes': [],
745
+                                'selected-nodes': [],
746
+                                'top-node': [('generic attribute',
747
+        loc('sources/xtv.py'),
748
+        'data')]},
741 749
         loc('test1.py'): {'expanded-nodes': [],
742 750
                           'selected-nodes': [],
743 751
                           'top-node': [('generic attribute',
@@ -865,7 +873,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
865 873
         loc('unknown:<untitled> #4'): {'expanded-nodes': [],
866 874
                                        'selected-nodes': [],
867 875
                                        'top-node': None},
868
-        loc('unknown:<untitled> #6'): {'column-widths': [1.0],
876
+        loc('unknown:<untitled> #3'): {'column-widths': [1.0],
869 877
                                        'expanded-nodes': [],
870 878
                                        'selected-nodes': [],
871 879
                                        'top-node': None},
@@ -873,7 +881,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
873 881
                                        'expanded-nodes': [],
874 882
                                        'selected-nodes': [],
875 883
                                        'top-node': None},
876
-        loc('unknown:<untitled> #3'): {'expanded-nodes': [],
884
+        loc('unknown:<untitled> #6'): {'expanded-nodes': [],
877 885
                                        'selected-nodes': [],
878 886
                                        'top-node': None}},
879 887
                                 'browse_mode': u'Current Module',
@@ -900,7 +908,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
900 908
                                None)],
901 909
                  'primary_view_state': {'area': 'wide',
902 910
         'constraint': None,
903
-        'current_pages': [2,
911
+        'current_pages': [4,
904 912
                           0],
905 913
         'notebook_display': 'normal',
906 914
         'notebook_percent': 0.32265812650120096,
@@ -934,12 +942,12 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
934 942
                                        'fMatchCase': False,
935 943
                                        'fOmitBinary': True,
936 944
                                        'fRegexFlags': 42,
937
-                                       'fReplaceText': u'filmix.co',
945
+                                       'fReplaceText': u'xtv::',
938 946
                                        'fReverse': False,
939
-                                       'fSearchText': u'sorted',
947
+                                       'fSearchText': u'meklet',
940 948
                                        'fStartPos': 0,
941 949
                                        'fStyle': 'text',
942
-                                       'fWholeWords': True,
950
+                                       'fWholeWords': False,
943 951
                                        'fWrap': True},
944 952
                        'fUIOptions': {'fAutoBackground': True,
945 953
                                       'fFilePrefix': 'short-file',
@@ -1010,32 +1018,27 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1010 1018
         -1,
1011 1019
         -1),
1012 1020
                        'attrib-starts': [],
1013
-                       'first-line': 128L,
1021
+                       'first-line': 64L,
1014 1022
                        'folded-linenos': [],
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',
1023
-        'js\n',
1023
+                       'history': {u'file:C:/Data/Programming/enigma2/PlayStream2/content/sources/xtv.py': ['i'\
1024
+        'tem\n',
1025
+        'item[0]\n',
1024 1026
         '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']},
1027
+        'title\n',
1028
+        'wheb\n',
1029
+        'when\n',
1030
+        'qs\n',
1031
+        'plist\n',
1032
+        'clist\n',
1033
+        'r2\n',
1034
+        'r2[0]\n',
1035
+        'r2[1]\n',
1036
+        'print r2\n']},
1034 1037
                        'launch-id': None,
1035
-                       'sel-line': 132L,
1036
-                       'sel-line-start': 12260L,
1037
-                       'selection_end': 12272L,
1038
-                       'selection_start': 12261L,
1038
+                       'sel-line': 65L,
1039
+                       'sel-line-start': 10947L,
1040
+                       'selection_end': 10947L,
1041
+                       'selection_start': 10947L,
1039 1042
                        'zoom': 0L}),
1040 1043
                      ('debug-watch',
1041 1044
                       'wide',
@@ -1074,314 +1077,339 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1074 1077
         -1,
1075 1078
         -1),
1076 1079
                        'attrib-starts': [],
1077
-                       'first-line': 0L,
1080
+                       'first-line': 4L,
1078 1081
                        'folded-linenos': [],
1079
-                       'history': {},
1082
+                       'history': {None: ['r2\n']},
1080 1083
                        'launch-id': None,
1081
-                       'sel-line': 2L,
1082
-                       'sel-line-start': 163L,
1083
-                       'selection_end': 163L,
1084
-                       'selection_start': 163L,
1084
+                       'sel-line': 10L,
1085
+                       'sel-line-start': 379L,
1086
+                       'selection_end': 379L,
1087
+                       'selection_start': 379L,
1085 1088
                        'zoom': 0L})],
1086
-        'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('sources/tvplay.py'),
1089
+        'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('sources/replay.py'),
1087 1090
         {'attrib-starts': [('Source',
1088
-                            32),
1091
+                            31),
1089 1092
                            ('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,
1093
+                            42)],
1094
+         'first-line': 41L,
1095
+         'folded-linenos': [70L,
1096
+                            89L,
1097
+                            143L,
1098
+                            166L,
1099
+                            284L],
1100
+         'sel-line': 52L,
1101
+         'sel-line-start': 1776L,
1102
+         'selection_end': 1835L,
1103
+         'selection_start': 1831L,
1097 1104
          'zoom': 0L},
1098
-        1545558002.612],
1099
-        [loc('sources/tvplay.py'),
1105
+        1548541029.557],
1106
+        [loc('sources/replay.py'),
1100 1107
          {'attrib-starts': [('Source',
1101
-                             32),
1108
+                             31),
1102 1109
                             ('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,
1110
+                             42)],
1111
+          'first-line': 41L,
1112
+          'folded-linenos': [70L,
1113
+                             89L,
1114
+                             143L,
1115
+                             166L,
1116
+                             284L],
1117
+          'sel-line': 53L,
1118
+          'sel-line-start': 1866L,
1119
+          'selection_end': 1947L,
1120
+          'selection_start': 1943L,
1110 1121
           'zoom': 0L},
1111
-         1545558003.204],
1112
-        [loc('sources/tvplay.py'),
1122
+         1548541029.854],
1123
+        [loc('sources/replay.py'),
1113 1124
          {'attrib-starts': [('Source',
1114
-                             32),
1125
+                             31),
1115 1126
                             ('Source.get_content',
1116
-                             62)],
1117
-          'first-line': 0L,
1118
-          'folded-linenos': [159L],
1119
-          'sel-line': 111L,
1120
-          'sel-line-start': 5003L,
1121
-          'selection_end': 5046L,
1122
-          'selection_start': 5035L,
1127
+                             42)],
1128
+          'first-line': 41L,
1129
+          'folded-linenos': [70L,
1130
+                             89L,
1131
+                             143L,
1132
+                             166L,
1133
+                             284L],
1134
+          'sel-line': 54L,
1135
+          'sel-line-start': 1981L,
1136
+          'selection_end': 2055L,
1137
+          'selection_start': 2051L,
1123 1138
           'zoom': 0L},
1124
-         1545558778.089],
1125
-        [loc('sources/tvplay.py'),
1139
+         1548541030.064],
1140
+        [loc('sources/replay.py'),
1126 1141
          {'attrib-starts': [('Source',
1127
-                             32),
1142
+                             31),
1128 1143
                             ('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,
1144
+                             42)],
1145
+          'first-line': 41L,
1146
+          'folded-linenos': [70L,
1147
+                             89L,
1148
+                             143L,
1149
+                             166L,
1150
+                             284L],
1151
+          'sel-line': 55L,
1152
+          'sel-line-start': 2097L,
1153
+          'selection_end': 2165L,
1154
+          'selection_start': 2161L,
1136 1155
           'zoom': 0L},
1137
-         1545558778.193],
1138
-        [loc('sources/tvplay.py'),
1156
+         1548541030.285],
1157
+        [loc('sources/replay.py'),
1139 1158
          {'attrib-starts': [('Source',
1140
-                             32),
1159
+                             31),
1141 1160
                             ('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,
1161
+                             42)],
1162
+          'first-line': 41L,
1163
+          'folded-linenos': [70L,
1164
+                             89L,
1165
+                             143L,
1166
+                             166L,
1167
+                             284L],
1168
+          'sel-line': 56L,
1169
+          'sel-line-start': 2207L,
1170
+          'selection_end': 2291L,
1171
+          'selection_start': 2287L,
1149 1172
           'zoom': 0L},
1150
-         1545558783.365],
1151
-        [loc('sources/tvplay.py'),
1173
+         1548541030.467],
1174
+        [loc('sources/replay.py'),
1152 1175
          {'attrib-starts': [('Source',
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,
1176
+                             31),
1177
+                            ('Source.get_content',
1178
+                             42)],
1179
+          'first-line': 41L,
1180
+          'folded-linenos': [70L,
1181
+                             89L,
1182
+                             143L,
1183
+                             166L,
1184
+                             284L],
1185
+          'sel-line': 57L,
1186
+          'sel-line-start': 2327L,
1187
+          'selection_end': 2398L,
1188
+          'selection_start': 2394L,
1162 1189
           'zoom': 0L},
1163
-         1545558791.827],
1164
-        [loc('sources/tvplay.py'),
1190
+         1548541030.645],
1191
+        [loc('sources/replay.py'),
1165 1192
          {'attrib-starts': [('Source',
1166
-                             32),
1193
+                             31),
1167 1194
                             ('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,
1195
+                             42)],
1196
+          'first-line': 47L,
1197
+          'folded-linenos': [70L,
1198
+                             89L,
1199
+                             143L,
1200
+                             166L,
1201
+                             284L],
1202
+          'sel-line': 58L,
1203
+          'sel-line-start': 2435L,
1204
+          'selection_end': 2505L,
1205
+          'selection_start': 2501L,
1175 1206
           'zoom': 0L},
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,
1183
-          'folded-linenos': [],
1184
-          'sel-line': 184L,
1185
-          'sel-line-start': 5644L,
1186
-          'selection_end': 5668L,
1187
-          'selection_start': 5665L,
1188
-          'zoom': 0L},
1189
-         1545607477.945],
1190
-        [loc('sources/tvplay.py'),
1207
+         1548541030.862],
1208
+        [loc('sources/replay.py'),
1191 1209
          {'attrib-starts': [('Source',
1192
-                             32),
1210
+                             31),
1193 1211
                             ('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,
1212
+                             42)],
1213
+          'first-line': 47L,
1214
+          'folded-linenos': [70L,
1215
+                             89L,
1216
+                             143L,
1217
+                             166L,
1218
+                             284L],
1219
+          'sel-line': 59L,
1220
+          'sel-line-start': 2548L,
1221
+          'selection_end': 2600L,
1222
+          'selection_start': 2596L,
1201 1223
           'zoom': 0L},
1202
-         1545607481.611],
1203
-        [loc('sources/filmas.py'),
1224
+         1548541031.096],
1225
+        [loc('sources/replay.py'),
1204 1226
          {'attrib-starts': [('Source',
1205
-                             36),
1206
-                            ('Source.get_streams',
1207
-                             108)],
1208
-          'first-line': 159L,
1209
-          'folded-linenos': [],
1210
-          'sel-line': 168L,
1211
-          'sel-line-start': 7362L,
1212
-          'selection_end': 7404L,
1213
-          'selection_start': 7404L,
1227
+                             31),
1228
+                            ('Source.get_content',
1229
+                             42)],
1230
+          'first-line': 47L,
1231
+          'folded-linenos': [70L,
1232
+                             89L,
1233
+                             143L,
1234
+                             166L,
1235
+                             284L],
1236
+          'sel-line': 61L,
1237
+          'sel-line-start': 2644L,
1238
+          'selection_end': 2702L,
1239
+          'selection_start': 2698L,
1214 1240
           'zoom': 0L},
1215
-         1545607482.317],
1216
-        [loc('sources/tvplay.py'),
1241
+         1548541031.32],
1242
+        [loc('sources/replay.py'),
1217 1243
          {'attrib-starts': [('Source',
1218
-                             32),
1244
+                             31),
1219 1245
                             ('Source.get_content',
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,
1246
+                             42)],
1247
+          'first-line': 47L,
1248
+          'folded-linenos': [70L,
1249
+                             89L,
1250
+                             143L,
1251
+                             166L,
1252
+                             284L],
1253
+          'sel-line': 62L,
1254
+          'sel-line-start': 2733L,
1255
+          'selection_end': 2803L,
1256
+          'selection_start': 2799L,
1227 1257
           'zoom': 0L},
1228
-         1545607483.324],
1229
-        [loc('sources/filmix.py'),
1258
+         1548541031.52],
1259
+        [loc('sources/replay.py'),
1230 1260
          {'attrib-starts': [('Source',
1231 1261
                              31),
1232 1262
                             ('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,
1263
+                             42)],
1264
+          'first-line': 47L,
1265
+          'folded-linenos': [70L,
1266
+                             89L,
1267
+                             143L,
1268
+                             166L,
1269
+                             284L],
1270
+          'sel-line': 63L,
1271
+          'sel-line-start': 2837L,
1272
+          'selection_end': 2911L,
1273
+          'selection_start': 2907L,
1241 1274
           'zoom': 0L},
1242
-         1545609588.231],
1243
-        [loc('sources/filmix.py'),
1275
+         1548541031.754],
1276
+        [loc('sources/replay.py'),
1244 1277
          {'attrib-starts': [('Source',
1245 1278
                              31),
1246
-                            ('Source.get_streams',
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,
1254
-          'zoom': 0L},
1255
-         1545611652.114],
1256
-        [loc('run.py'),
1257
-         {'attrib-starts': [('Main',
1258
-                             22),
1259
-                            ('Main.play_video',
1260
-                             242)],
1261
-          'first-line': 251L,
1262
-          'folded-linenos': [],
1263
-          'sel-line': 264L,
1264
-          'sel-line-start': 10425L,
1265
-          'selection_end': 10425L,
1266
-          'selection_start': 10425L,
1279
+                            ('Source.get_content',
1280
+                             42)],
1281
+          'first-line': 53L,
1282
+          'folded-linenos': [70L,
1283
+                             89L,
1284
+                             143L,
1285
+                             166L,
1286
+                             284L],
1287
+          'sel-line': 64L,
1288
+          'sel-line-start': 2953L,
1289
+          'selection_end': 3012L,
1290
+          'selection_start': 3008L,
1267 1291
           'zoom': 0L},
1268
-         1545611733.467],
1269
-        [loc('sources/filmix.py'),
1292
+         1548541031.98],
1293
+        [loc('sources/replay.py'),
1270 1294
          {'attrib-starts': [('Source',
1271 1295
                              31),
1272 1296
                             ('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,
1297
+                             42)],
1298
+          'first-line': 53L,
1299
+          'folded-linenos': [70L,
1300
+                             89L,
1301
+                             143L,
1302
+                             166L,
1303
+                             284L],
1304
+          'sel-line': 65L,
1305
+          'sel-line-start': 3058L,
1306
+          'selection_end': 3128L,
1307
+          'selection_start': 3124L,
1280 1308
           'zoom': 0L},
1281
-         1545611946.253],
1282
-        [loc('sources/filmix.py'),
1309
+         1548541032.449],
1310
+        [loc('sources/replay.py'),
1283 1311
          {'attrib-starts': [('Source',
1284 1312
                              31),
1285
-                            ('Source.get_streams',
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,
1313
+                            ('Source.get_content',
1314
+                             42)],
1315
+          'first-line': 60L,
1316
+          'folded-linenos': [89L,
1317
+                             143L,
1318
+                             166L,
1319
+                             284L],
1320
+          'sel-line': 71L,
1321
+          'sel-line-start': 3286L,
1322
+          'selection_end': 3348L,
1323
+          'selection_start': 3344L,
1293 1324
           'zoom': 0L},
1294
-         1545613448.203],
1295
-        [loc('sources/ltc.py'),
1325
+         1548541032.682],
1326
+        [loc('sources/replay.py'),
1296 1327
          {'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,
1328
+                             31),
1329
+                            ('Source.get_content',
1330
+                             42)],
1331
+          'first-line': 76L,
1332
+          'folded-linenos': [89L,
1333
+                             143L,
1334
+                             166L,
1335
+                             284L],
1336
+          'sel-line': 81L,
1337
+          'sel-line-start': 3799L,
1338
+          'selection_end': 3861L,
1339
+          'selection_start': 3857L,
1318 1340
           'zoom': 0L},
1319
-         1545613550.475],
1320
-        [loc('sources/ltc.py'),
1341
+         1548541036.191],
1342
+        [loc('sources/replay.py'),
1321 1343
          {'attrib-starts': [('Source',
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,
1344
+                             31),
1345
+                            ('Source.get_content',
1346
+                             42)],
1347
+          'first-line': 47L,
1348
+          'folded-linenos': [143L,
1349
+                             166L,
1350
+                             284L],
1351
+          'sel-line': 52L,
1352
+          'sel-line-start': 1776L,
1353
+          'selection_end': 1821L,
1354
+          'selection_start': 1815L,
1343 1355
           'zoom': 0L},
1344
-         1545613552.544],
1345
-        [loc('sources/ltc.py'),
1356
+         1548541039.005],
1357
+        [loc('sources/replay.py'),
1346 1358
          {'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,
1359
+                             31),
1360
+                            ('Source.get_content',
1361
+                             42)],
1362
+          'first-line': 0L,
1363
+          'folded-linenos': [143L,
1364
+                             166L,
1365
+                             284L],
1366
+          'sel-line': 52L,
1367
+          'sel-line-start': 1776L,
1368
+          'selection_end': 1821L,
1369
+          'selection_start': 1815L,
1368 1370
           'zoom': 0L},
1369
-         1545613598.407],
1370
-        [loc('sources/filmix.py'),
1371
+         1548541069.483],
1372
+        [loc('sources/xtv.py'),
1371 1373
          {'attrib-starts': [('Source',
1372
-                             31),
1374
+                             32),
1373 1375
                             ('Source.get_streams',
1374
-                             270)],
1375
-          'first-line': 349L,
1376
+                             105)],
1377
+          'first-line': 33L,
1376 1378
           'folded-linenos': [],
1377
-          'sel-line': 351L,
1378
-          'sel-line-start': 15581L,
1379
-          'selection_end': 15640L,
1380
-          'selection_start': 15640L,
1379
+          'sel-line': 127L,
1380
+          'sel-line-start': 5366L,
1381
+          'selection_end': 5366L,
1382
+          'selection_start': 5366L,
1383
+          'zoom': 0L},
1384
+         1548541075.895],
1385
+        [loc('sources/tvplay.py'),
1386
+         {'attrib-starts': [('Source',
1387
+                             32),
1388
+                            ('Source.__init__',
1389
+                             34)],
1390
+          'first-line': 37L,
1391
+          'folded-linenos': [159L],
1392
+          'sel-line': 42L,
1393
+          'sel-line-start': 1296L,
1394
+          'selection_end': 1307L,
1395
+          'selection_start': 1303L,
1381 1396
           'zoom': 0L},
1382
-         1545613904.974]],
1397
+         1548541077.854],
1398
+        [loc('sources/tvplay.py'),
1399
+         {'attrib-starts': [('Source',
1400
+                             32),
1401
+                            ('Source.get_content',
1402
+                             62)],
1403
+          'first-line': 65L,
1404
+          'folded-linenos': [159L],
1405
+          'sel-line': 70L,
1406
+          'sel-line-start': 2616L,
1407
+          'selection_end': 2659L,
1408
+          'selection_start': 2653L,
1409
+          'zoom': 0L},
1410
+         1548541115.158]],
1383 1411
         20),
1384
-        'current-loc': loc('sources/filmix.py'),
1412
+        'current-loc': loc('sources/xtv.py'),
1385 1413
         'editor-state-list': [(loc('run.py'),
1386 1414
                                {'attrib-starts': [('Main',
1387 1415
         22),
@@ -1395,24 +1423,24 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1395 1423
                                 'selection_start': 10425L,
1396 1424
                                 'zoom': 0L}),
1397 1425
                               (loc('util.py'),
1398
-                               {'attrib-starts': [('unescape',
1399
-        561)],
1400
-                                'first-line': 556L,
1426
+                               {'attrib-starts': [('item',
1427
+        362)],
1428
+                                'first-line': 357L,
1401 1429
                                 'folded-linenos': [573L,
1402 1430
         576L,
1403 1431
         609L,
1404 1432
         631L],
1405
-                                'sel-line': 563L,
1406
-                                'sel-line-start': 17864L,
1407
-                                'selection_end': 17864L,
1408
-                                'selection_start': 17864L,
1433
+                                'sel-line': 373L,
1434
+                                'sel-line-start': 12877L,
1435
+                                'selection_end': 12890L,
1436
+                                'selection_start': 12886L,
1409 1437
                                 'zoom': 0L}),
1410 1438
                               (loc('sources/ltc.py'),
1411 1439
                                {'attrib-starts': [('Source',
1412 1440
         26),
1413
-        ('Source.get_streams',
1414
-         572)],
1415
-                                'first-line': 637L,
1441
+        ('Source.get_content',
1442
+         78)],
1443
+                                'first-line': 392L,
1416 1444
                                 'folded-linenos': [132L,
1417 1445
         161L,
1418 1446
         221L,
@@ -1426,38 +1454,48 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1426 1454
         399L,
1427 1455
         412L,
1428 1456
         532L],
1429
-                                'sel-line': 646L,
1430
-                                'sel-line-start': 37498L,
1431
-                                'selection_end': 37506L,
1432
-                                'selection_start': 37506L,
1457
+                                'sel-line': 427L,
1458
+                                'sel-line-start': 26265L,
1459
+                                'selection_end': 26282L,
1460
+                                'selection_start': 26282L,
1433 1461
                                 'zoom': 0L}),
1434 1462
                               (loc('sources/replay.py'),
1435 1463
                                {'attrib-starts': [('Source',
1436 1464
         31),
1437
-        ('Source.get_streams',
1438
-         220)],
1439
-                                'first-line': 165L,
1440
-                                'folded-linenos': [70L,
1441
-        89L,
1442
-        143L,
1465
+        ('Source.get_content',
1466
+         42)],
1467
+                                'first-line': 0L,
1468
+                                'folded-linenos': [143L,
1443 1469
         166L,
1444 1470
         284L],
1445
-                                'sel-line': 221L,
1446
-                                'sel-line-start': 11331L,
1447
-                                'selection_end': 11331L,
1448
-                                'selection_start': 11331L,
1471
+                                'sel-line': 52L,
1472
+                                'sel-line-start': 1776L,
1473
+                                'selection_end': 1821L,
1474
+                                'selection_start': 1815L,
1449 1475
                                 'zoom': 0L}),
1450 1476
                               (loc('sources/tvplay.py'),
1451 1477
                                {'attrib-starts': [('Source',
1452 1478
         32),
1453 1479
         ('Source.get_content',
1454 1480
          62)],
1455
-                                'first-line': 104L,
1481
+                                'first-line': 65L,
1456 1482
                                 'folded-linenos': [159L],
1457
-                                'sel-line': 106L,
1458
-                                'sel-line-start': 4768L,
1459
-                                'selection_end': 4862L,
1460
-                                'selection_start': 4850L,
1483
+                                'sel-line': 70L,
1484
+                                'sel-line-start': 2616L,
1485
+                                'selection_end': 2659L,
1486
+                                'selection_start': 2653L,
1487
+                                'zoom': 0L}),
1488
+                              (loc('sources/xtv.py'),
1489
+                               {'attrib-starts': [('Source',
1490
+        32),
1491
+        ('Source.get_content',
1492
+         41)],
1493
+                                'first-line': 48L,
1494
+                                'folded-linenos': [],
1495
+                                'sel-line': 61L,
1496
+                                'sel-line-start': 2525L,
1497
+                                'selection_end': 2600L,
1498
+                                'selection_start': 2600L,
1461 1499
                                 'zoom': 0L}),
1462 1500
                               (loc('sources/euronews.py'),
1463 1501
                                {'attrib-starts': [('Source',
@@ -1505,11 +1543,12 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1505 1543
                                 'selection_start': 12065L,
1506 1544
                                 'zoom': 0L}),
1507 1545
                               (loc('../../../../../Python27/Lib/site-packages/PIL/Image.py'),
1508
-                               {'attrib-starts': [],
1546
+                               {'attrib-starts': [('DecompressionBombError',
1547
+        73)],
1509 1548
                                 'first-line': 40L,
1510 1549
                                 'folded-linenos': [],
1511
-                                'sel-line': 60L,
1512
-                                'sel-line-start': 1578L,
1550
+                                'sel-line': 73L,
1551
+                                'sel-line-start': 1583L,
1513 1552
                                 'selection_end': 1583L,
1514 1553
                                 'selection_start': 1583L,
1515 1554
                                 'zoom': 0L}),
@@ -1528,14 +1567,14 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1528 1567
                               (loc('ContentSources.py'),
1529 1568
                                {'attrib-starts': [('ContentSources',
1530 1569
         16),
1531
-        ('ContentSources.get_streams',
1532
-         96)],
1533
-                                'first-line': 104L,
1570
+        ('ContentSources.get_content',
1571
+         64)],
1572
+                                'first-line': 75L,
1534 1573
                                 'folded-linenos': [],
1535
-                                'sel-line': 115L,
1536
-                                'sel-line-start': 4877L,
1537
-                                'selection_end': 4877L,
1538
-                                'selection_start': 4877L,
1574
+                                'sel-line': 77L,
1575
+                                'sel-line-start': 3497L,
1576
+                                'selection_end': 3536L,
1577
+                                'selection_start': 3536L,
1539 1578
                                 'zoom': 0L})],
1540 1579
         'has-focus': True,
1541 1580
         'locked': False},
@@ -1544,6 +1583,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1544 1583
          loc('sources/ltc.py'),
1545 1584
          loc('sources/replay.py'),
1546 1585
          loc('sources/tvplay.py'),
1586
+         loc('sources/xtv.py'),
1547 1587
          loc('sources/euronews.py'),
1548 1588
          loc('sources/config.py'),
1549 1589
          loc('changelog.md'),
@@ -1551,20 +1591,21 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1551 1591
          loc('../../../../../Python27/Lib/site-packages/PIL/Image.py'),
1552 1592
          loc('sources/lmt.py'),
1553 1593
          loc('ContentSources.py')]),
1554
-                               'open_files': [u'ContentSources.py',
1555
-        u'changelog.md',
1594
+                               'open_files': [u'changelog.md',
1595
+        u'run.py',
1556 1596
         u'sources/config.py',
1557 1597
         u'sources/euronews.py',
1598
+        u'sources/filmix.py',
1558 1599
         u'sources/lmt.py',
1559
-        u'sources/replay.py',
1560
-        u'util.py',
1561 1600
         u'../../../../../Python27/Lib/site-packages/PIL/Image.py',
1562
-        u'sources/tvplay.py',
1563
-        u'run.py',
1564 1601
         u'sources/ltc.py',
1565
-        u'sources/filmix.py']},
1602
+        u'ContentSources.py',
1603
+        u'util.py',
1604
+        u'sources/replay.py',
1605
+        u'sources/tvplay.py',
1606
+        u'sources/xtv.py']},
1566 1607
         'saved_notebook_display': None,
1567
-        'split_percents': {0: 0.5388225255972696},
1608
+        'split_percents': {0: 0.44890202702702703},
1568 1609
         'splits': 2,
1569 1610
         'tab_location': 'top',
1570 1611
         'user_data': {}},
@@ -1577,14 +1618,16 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1577 1618
                          0,
1578 1619
                          2432,
1579 1620
                          1440)}]}
1580
-guimgr.recent-documents = [loc('sources/filmix.py'),
1581
-                           loc('sources/ltc.py'),
1582
-                           loc('run.py'),
1621
+guimgr.recent-documents = [loc('sources/xtv.py'),
1583 1622
                            loc('sources/tvplay.py'),
1584
-                           loc('../../../../../Python27/Lib/site-packages/PIL/Image.py'),
1585
-                           loc('sources/lmt.py'),
1586 1623
                            loc('sources/replay.py'),
1587 1624
                            loc('util.py'),
1625
+                           loc('ContentSources.py'),
1626
+                           loc('sources/ltc.py'),
1627
+                           loc('../../../../../Python27/Lib/site-packages/PIL/Image.py'),
1628
+                           loc('sources/filmix.py'),
1629
+                           loc('run.py'),
1630
+                           loc('sources/lmt.py'),
1588 1631
                            loc('sources/euronews.py'),
1589 1632
                            loc('changelog.md'),
1590 1633
                            loc('sources/config.py')]
@@ -2238,7 +2281,14 @@ search.replace-history = [u'filmix.co',
2238 2281
                           u'https://replay.lsm.lv',
2239 2282
                           u'www.shortcut.lv',
2240 2283
                           u'shortcut.lv']
2241
-search.search-history = [u'sorted',
2284
+search.search-history = [u'meklet',
2285
+                         u'lang',
2286
+                         u'page=',
2287
+                         u'util',
2288
+                         u'unesa',
2289
+                         u'play24::',
2290
+                         u'categori',
2291
+                         u'sorted',
2242 2292
                          u'self.kategorijas',
2243 2293
                          u'kategorijas',
2244 2294
                          u'"playlist"',
@@ -2250,14 +2300,7 @@ search.search-history = [u'sorted',
2250 2300
                          u'raidijumi/kategorijas',
2251 2301
                          u'tvSeries/category/id/33?type=tvseries&',
2252 2302
                          u'size=',
2253
-                         u'set/search?f_metadata.tvSeri',
2254
-                         u'g149',
2255
-                         u'content.app',
2256
-                         u'~',
2257
-                         u'title =',
2258
-                         u'title',
2259
-                         u'nfo',
2260
-                         u'"nfo"']
2303
+                         u'set/search?f_metadata.tvSeri']
2261 2304
 testing.stored-results = (1,
2262 2305
                           [],
2263 2306
                           {})

+ 1
- 0
sources/play24.py Целия файл

@@ -29,6 +29,7 @@ h = HTMLParser.HTMLParser()
29 29
 class Source(SourceBase):
30 30
 
31 31
     def __init__(self,country="lv",cfg_path=None):
32
+        self.hidden = True # nerāda menu nestrādājošos avotus
32 33
         self.name = "play24"
33 34
         self.title = "Play24.lv"
34 35
         self.img = "riga24.png"

+ 1
- 1
sources/streams.cfg Целия файл

@@ -7,7 +7,7 @@ My Kids|config::my_kids|my_kids.png|Mani bērnu video
7 7
 Replay.lv (LTV)|replay::home|replay.png|Latvijas TV tiešraides un arhīvs
8 8
 TVPlay|tvplay::home|tvplay.png|tvplay.skaties.lv saturs
9 9
 Shortcut (lattelecom.tv)|ltc::home|shortcut.png|lattelecom TV, arhīves un video
10
-Play24.lv (Riga24TV)|play24::home|riga24.png|play24.lv (Riga24TV)tiešraide un arhīvs
10
+XTV.lv|xtv::home|xtv.png|xtv.lv satura skatīšanās (TVRiga24,360TV,STV)
11 11
 LMT straume|lmt::home|lmt.png|LMT straume - dažādi video latviesu valodā
12 12
 Filmas.lv|filmas::home|filmas.png|Filmas.lv - Latvijas filmas
13 13
 viaplay.lv|viaplay::home|viaplay.png|Viaplay.lv - filmas latviešu, krievu u.c. valodās

+ 142
- 0
sources/xtv.py Целия файл

@@ -0,0 +1,142 @@
1
+#!/usr/bin/env python
2
+# coding=utf8
3
+#
4
+# This file is part of PlayStream - enigma2 plugin to play video streams from various sources
5
+# Copyright (c) 2016 ivars777 (ivars777@gmail.com)
6
+# Distributed under the GNU GPL v3. For full terms see http://www.gnu.org/licenses/gpl-3.0.en.html
7
+#
8
+try:
9
+    import json
10
+except:
11
+    import simplejson as json
12
+
13
+import urllib2, urllib
14
+import datetime, re, sys, os
15
+import ssl
16
+if "_create_unverified_context" in dir(ssl):
17
+    ssl._create_default_https_context = ssl._create_unverified_context
18
+try:
19
+    import util
20
+except:
21
+    sys.path.insert(0,'..')
22
+    import util
23
+from SourceBase import SourceBase
24
+
25
+headers2dict = lambda  h: dict([l.strip().split(": ") for l in h.strip().splitlines()])
26
+re_search = lambda p, s: re.search( p, s, re.DOTALL).group(1).strip() if re.search( p, s, re.DOTALL) else ""
27
+headers0 = headers2dict("""
28
+User-Agent: Mozilla/5.0 (Linux; U; Android 4.4.4; Nexus 5 Build/KTU84P) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
29
+""")
30
+import HTMLParser
31
+h = HTMLParser.HTMLParser()
32
+
33
+class Source(SourceBase):
34
+
35
+    def __init__(self,country="lv",cfg_path=None):
36
+        self.name = "xtv"
37
+        self.title = "XTV.lv"
38
+        self.img = "xtv.png"
39
+        self.desc = "xtv.lv satura skatīšanās (TVRiga24,360TV,STV)"
40
+        self.country=country
41
+
42
+    def get_content(self, data):
43
+        print "[xtv] get_content:", data
44
+        source, data, path, plist, clist, params, qs = self.parse_data(data)
45
+        content = []
46
+        content.append(("..return", "back","back.png","Return back"))
47
+
48
+        if clist=="home":
49
+            content.extend([
50
+                ("Jaunākie", "xtv::latest", self.img,"Jaunākie video"),
51
+                ("Populārajie", "xtv::popular",self.img,"Populāraie video"),
52
+                ("Visi raidijumi", "xtv::programs",self.img,"Visi raidījumi"),
53
+                ("Izklaide", "xtv::category/gnPBGaJp8or-izklaide?page=2",self.img,"Izklaides raidījumi un sižeti"),
54
+                ("Ziņas", "xtv::category/6blmNmLpOPR-zinas?page=2",self.img,"Ziņu raidījumi un sižeti"),
55
+                ("Diskusijas", "category/AZoQGEwNX89-diskusijas?page=2",self.img,"Diskusiju raidījumi un sižeti"),
56
+                ("Sports", "xtv::category/Lymz7BwGXEk-sports?page=2",self.img,"Sporta raidījumi un sižeti"),
57
+                ("Meklēt", "xtv::search?q={0}",self.img,"Meklēt raidījumus un sižetus"),
58
+             ])
59
+            return content
60
+
61
+        ### Saraksti ###
62
+        elif clist in ("latest", "popular", "category", "programs", "search") or plist[1] == "program":
63
+            r = self.call(data)
64
+            for r0 in re.findall(r'<div class="(tvplot|broadcast)">(.+?)</a>\s+</div>\s+</div>', r, re.DOTALL):
65
+                r2 = r0[1]
66
+                title = util.unescape(re_search("<h5>([^<]+)<", r2))
67
+                data2 = re_search('href="/(.+?)"', r2)
68
+                if "/program/" in data2:
69
+                    data2 += "?page=1"
70
+                img = re_search('src="(.+?)"', r2)
71
+                duration = re_search('<span class="duration">(.+?)</span>', r2)
72
+                when = re_search('<span>([^<]+)</span>', r2)
73
+                category =  re_search('<p>([^<]+)</p>', r2)
74
+                chan = re_search('<img alt="(.+?) logo"', r2) # <img alt="RigaTV24 logo"
75
+                desc = util.unescape(re_search('title="(.*?)"', r2))
76
+                if when or duration:
77
+                    desc += "\n%s %s" % (when, duration)
78
+                if category:
79
+                    desc += "\n%s" % (category)
80
+                if "/video/" in data2:
81
+                    chan = data2.split("/")[0].upper()
82
+                if chan:
83
+                    title = "%s [%s] " % (title, chan)
84
+                content.append((title,self.name+"::"+data2,img,desc))
85
+            if "page" in qs:
86
+                page = int(qs["page"]) + 1
87
+                data2 = re.sub("page=\d+", "page=%s" % page, data)
88
+                content.append(("Next page",self.name+"::"+data2,"next.png","Next page"))
89
+            return content
90
+
91
+        ### Meklēt ###
92
+        elif data == "search":
93
+            return content
94
+
95
+        else:
96
+            return content
97
+
98
+
99
+    def is_video(self,data):
100
+        source,data,path,plist,clist,params,qs = self.parse_data(data)
101
+        if len(plist) > 1 and plist[1] == "video":
102
+            return True
103
+        else:
104
+            return False
105
+
106
+    def get_streams(self,data):
107
+        print "[xtv] get_streams:", data
108
+        if not self.is_video(data):
109
+            return []
110
+        source,data,path,plist,clist,params,qs = self.parse_data(data)
111
+        r = self.call(data)
112
+        # src: "https://video.xtv.lv/files/cc/e5/cce5a0e95dea4404280dabb2a8470f0b/original.mp4", type: "video
113
+        data2 = re_search('src: "([^"]+)", type: "video', r)
114
+        if not data2:
115
+            return []
116
+        title = util.unescape(re_search('"og:title" content="([^"]+)"', r))
117
+        desc = util.unescape(re_search('"description" content="([^"]+)"', r))
118
+        img = re_search('"thumbnailUrl": "([^"]+)"', r) # "thumbnailUrl": "
119
+
120
+        stream = util.item()
121
+        stream["name"] = title
122
+        stream["url"] = data2
123
+        stream["img"] = img
124
+        stream["desc"] = desc
125
+        stream["lang"] = "lv"
126
+        stream["resolver"] = "xtv"
127
+        return [stream]
128
+
129
+    def call(self, data,headers=headers0,lang=""):
130
+        API_URL = "https://xtv.lv/"
131
+        #if not lang: lang = self.country
132
+        url = API_URL + data
133
+        content = self._http_request(url)
134
+        return content
135
+
136
+if __name__ == "__main__":
137
+    sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
138
+    import run
139
+    source = Source()
140
+    data= sys.argv[1] if len(sys.argv)>1 else source.name+"::home"
141
+    run.run(source, data)
142
+    sys.exit()