Bläddra i källkod

salabots lmt un tvplay

Ivars 5 år sedan
förälder
incheckning
dd96e769f4
3 ändrade filer med 346 tillägg och 332 borttagningar
  1. 328
    324
      project.wpr
  2. 1
    0
      sources/lmt.py
  3. 17
    8
      sources/tvplay.py

+ 328
- 324
project.wpr Visa fil

@@ -169,11 +169,11 @@ debug.breakpoints = {loc('Downloader.py'): {94: (0,
169 169
         None,
170 170
         1,
171 171
         0)},
172
-                     loc('sources/lmt.py'): {180L: (0,
172
+                     loc('sources/lmt.py'): {181L: (0,
173 173
         None,
174 174
         1,
175 175
         0),
176
-        217L: (0,
176
+        218L: (0,
177 177
                None,
178 178
                1,
179 179
                0)},
@@ -193,6 +193,10 @@ debug.breakpoints = {loc('Downloader.py'): {94: (0,
193 193
                None,
194 194
                1,
195 195
                0),
196
+        684L: (0,
197
+               None,
198
+               1,
199
+               0),
196 200
         971L: (0,
197 201
                None,
198 202
                1,
@@ -249,7 +253,7 @@ debug.breakpoints = {loc('Downloader.py'): {94: (0,
249 253
         None,
250 254
         1,
251 255
         0)},
252
-                     loc('sources/tvplay.py'): {124L: (0,
256
+                     loc('sources/tvplay.py'): {168L: (0,
253 257
         None,
254 258
         1,
255 259
         0)},
@@ -273,11 +277,11 @@ debug.breakpoints = {loc('Downloader.py'): {94: (0,
273 277
             None,
274 278
             1,
275 279
             0)},
276
-                     loc('unknown:<untitled> #1'): {10: (0,
280
+                     loc('unknown:<untitled> #2'): {10: (0,
277 281
         None,
278 282
         1,
279 283
         0)},
280
-                     loc('unknown:<untitled> #2'): {2: (0,
284
+                     loc('unknown:<untitled> #1'): {2: (0,
281 285
         None,
282 286
         1,
283 287
         0)}}
@@ -296,6 +300,7 @@ debug.err-values = {None: {},
296 300
                     loc('sources/euronews.py'): {},
297 301
                     loc('sources/filmas.py'): {},
298 302
                     loc('sources/filmix.py'): {},
303
+                    loc('sources/lmt.py'): {},
299 304
                     loc('sources/ltc.py'): {},
300 305
                     loc('sources/ltc2.py'): {},
301 306
                     loc('sources/replay.py'): {},
@@ -452,7 +457,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
452 457
                  'current_pages': [0,
453 458
                                    0],
454 459
                  'full-screen': False,
455
-                 'notebook_display': 'normal',
460
+                 'notebook_display': 'tabs only',
456 461
                  'notebook_percent': 0.20469432314410485,
457 462
                  'override_title': None,
458 463
                  'pagelist': [('project',
@@ -1059,10 +1064,10 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1059 1064
                                None)],
1060 1065
                  'primary_view_state': {'area': 'wide',
1061 1066
         'constraint': None,
1062
-        'current_pages': [4,
1063
-                          0],
1067
+        'current_pages': [2,
1068
+                          1],
1064 1069
         'notebook_display': 'normal',
1065
-        'notebook_percent': 0.3129139072847682,
1070
+        'notebook_percent': 0.3360927152317881,
1066 1071
         'override_title': None,
1067 1072
         'pagelist': [('debug-breakpoints',
1068 1073
                       'wide',
@@ -1095,7 +1100,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1095 1100
                                        'fRegexFlags': 42,
1096 1101
                                        'fReplaceText': u'xtv::',
1097 1102
                                        'fReverse': False,
1098
-                                       'fSearchText': u'YouTubeVideoUrl',
1103
+                                       'fSearchText': u'api_url',
1099 1104
                                        'fStartPos': 0,
1100 1105
                                        'fStyle': 'text',
1101 1106
                                        'fWholeWords': False,
@@ -1139,14 +1144,16 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1139 1144
         -1),
1140 1145
                        'attrib-starts': [],
1141 1146
                        'code-line': '',
1142
-                       'first-line': 0L,
1147
+                       'first-line': 1L,
1143 1148
                        'folded-linenos': [],
1144
-                       'history': {},
1149
+                       'history': {u'file:C:/Data/Programming/content/sources/tvplay.py': ['i'\
1150
+        'tem\n',
1151
+        'item["title"]\n']},
1145 1152
                        'launch-id': None,
1146
-                       'sel-line': 0L,
1147
-                       'sel-line-start': 0L,
1148
-                       'selection_end': 0L,
1149
-                       'selection_start': 0L,
1153
+                       'sel-line': 4L,
1154
+                       'sel-line-start': 1459L,
1155
+                       'selection_end': 1459L,
1156
+                       'selection_start': 1459L,
1150 1157
                        'zoom': 0L}),
1151 1158
                      ('debug-watch',
1152 1159
                       'wide',
@@ -1166,7 +1173,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1166 1173
                                        ('eval',
1167 1174
         'it')],
1168 1175
                        'tree-state': {'expanded-nodes': [],
1169
-                                      'selected-nodes': [(1,)],
1176
+                                      'selected-nodes': [(0,)],
1170 1177
                                       'top-node': (0,)}}),
1171 1178
                      ('messages',
1172 1179
                       'wide',
@@ -1199,334 +1206,291 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1199 1206
                        'selection_end': 163L,
1200 1207
                        'selection_start': 163L,
1201 1208
                        'zoom': 0L})],
1202
-        'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('sources/ltc.py'),
1203
-        {'attrib-starts': [('Source|0|',
1204
-                            26),
1205
-                           ('Source|0|.get_content|0|',
1206
-                            78)],
1207
-         'code-line': '                ("TV arh\xc4\xabvs", "ltc::arhivs",""'\
1208
-                      ',"TV arh\xc4\xabvs atsevi\xc5\xa1kiem kan\xc4\x81liem'\
1209
-                      '"),\r\n',
1210
-         'first-line': 83L,
1211
-         'folded-linenos': [188L,
1212
-                            581L],
1213
-         'sel-line': 88L,
1214
-         'sel-line-start': 3381L,
1215
-         'selection_end': 3407L,
1216
-         'selection_start': 3402L,
1209
+        'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('resolvers/youtuberesolver.py'),
1210
+        {'attrib-starts': [('YoutubePlayer|0|',
1211
+                            178)],
1212
+         'code-line': 'class YoutubePlayer(object):\n',
1213
+         'first-line': 0L,
1214
+         'folded-linenos': [5L,
1215
+                            154L,
1216
+                            178L],
1217
+         'sel-line': 178L,
1218
+         'sel-line-start': 7059L,
1219
+         'selection_end': 7087L,
1220
+         'selection_start': 7087L,
1217 1221
          'zoom': 0L},
1218
-        1563136078.051],
1222
+        1570392761.044],
1219 1223
         [loc('sources/ltc.py'),
1220 1224
          {'attrib-starts': [('Source|0|',
1221 1225
                              26),
1222 1226
                             ('Source|0|.get_content|0|',
1223 1227
                              78)],
1224
-          'code-line': '                ("TV arh\xc4\xabvs", "ltc::arhivs","'\
1225
-                       '","TV arh\xc4\xabvs atsevi\xc5\xa1kiem kan\xc4\x81li'\
1226
-                       'em"),\r\n',
1227
-          'first-line': 83L,
1228
+          'code-line': '            else:\r\n',
1229
+          'first-line': 248L,
1228 1230
           'folded-linenos': [188L,
1229 1231
                              581L],
1230
-          'sel-line': 88L,
1231
-          'sel-line-start': 3381L,
1232
-          'selection_end': 3408L,
1233
-          'selection_start': 3402L,
1232
+          'sel-line': 215L,
1233
+          'sel-line-start': 11002L,
1234
+          'selection_end': 11019L,
1235
+          'selection_start': 11019L,
1234 1236
           'zoom': 0L},
1235
-         1563136089.546],
1237
+         1570392808.59],
1236 1238
         [loc('sources/ltc.py'),
1237 1239
          {'attrib-starts': [('Source|0|',
1238 1240
                              26),
1239
-                            ('Source|0|.get_content|0|',
1240
-                             78)],
1241
-          'code-line': '            for item in r["items"]:\r\n',
1242
-          'first-line': 179L,
1241
+                            ('Source|0|.get_arhivs_url|0|',
1242
+                             911)],
1243
+          'code-line': '        #headers["Cookie"] = "%s; %s; MobBitr=1; "%('\
1244
+                       'self.session_id,self.mobtv_cache)\r\n',
1245
+          'first-line': 901L,
1243 1246
           'folded-linenos': [188L,
1244 1247
                              581L],
1245
-          'sel-line': 175L,
1246
-          'sel-line-start': 8312L,
1247
-          'selection_end': 8312L,
1248
-          'selection_start': 8312L,
1248
+          'sel-line': 916L,
1249
+          'sel-line-start': 48206L,
1250
+          'selection_end': 48234L,
1251
+          'selection_start': 48234L,
1249 1252
           'zoom': 0L},
1250
-         1563136296.493],
1251
-        [loc('sources/ltc2.py'),
1253
+         1570392834.588],
1254
+        [loc('sources/ltc.py'),
1252 1255
          {'attrib-starts': [('Source|0|',
1253
-                             30),
1254
-                            ('Source|0|.is_video|0|',
1255
-                             650)],
1256
-          'code-line': '    def is_video(self,data):\r\n',
1257
-          'first-line': 644L,
1258
-          'folded-linenos': [32L,
1259
-                             533L,
1260
-                             573L,
1261
-                             684L,
1262
-                             756L,
1263
-                             863L,
1264
-                             914L,
1265
-                             962L],
1266
-          'sel-line': 650L,
1267
-          'sel-line-start': 36967L,
1268
-          'selection_end': 36995L,
1269
-          'selection_start': 36995L,
1256
+                             26),
1257
+                            ('Source|0|.get_streams|0|',
1258
+                             572)],
1259
+          'code-line': '                streams.append(stream)\r\n',
1260
+          'first-line': 645L,
1261
+          'folded-linenos': [188L,
1262
+                             581L],
1263
+          'sel-line': 651L,
1264
+          'sel-line-start': 37868L,
1265
+          'selection_end': 37868L,
1266
+          'selection_start': 37868L,
1270 1267
           'zoom': 0L},
1271
-         1563136362.465],
1272
-        [loc('../../../Python27/Lib/lib-tk/Tkinter.py'),
1273
-         {'attrib-starts': [('Misc|0|',
1274
-                             432),
1275
-                            ('Misc|0|._substitute|0|',
1276
-                             1240),
1277
-                            ('Misc|0|._substitute|0|.getint_event|0|',
1278
-                             1246)],
1279
-          'code-line': '                return int(s)\n',
1280
-          'first-line': 1244L,
1281
-          'folded-linenos': [],
1282
-          'sel-line': 1249L,
1283
-          'sel-line-start': 49332L,
1284
-          'selection_end': 49332L,
1285
-          'selection_start': 49332L,
1268
+         1570430080.438],
1269
+        [loc('sources/ltc.py'),
1270
+         {'attrib-starts': [('Source|0|',
1271
+                             26),
1272
+                            ('Source|0|.get_channels|0|',
1273
+                             677)],
1274
+          'code-line': '        r= self.call("tv/channels")\r\n',
1275
+          'first-line': 655L,
1276
+          'folded-linenos': [188L,
1277
+                             581L],
1278
+          'sel-line': 682L,
1279
+          'sel-line-start': 39083L,
1280
+          'selection_end': 39103L,
1281
+          'selection_start': 39099L,
1286 1282
           'zoom': 0L},
1287
-         1563136417.111],
1288
-        [loc('sources/ltc2.py'),
1283
+         1570430120.655],
1284
+        [loc('sources/ltc.py'),
1289 1285
          {'attrib-starts': [('Source|0|',
1290
-                             30),
1291
-                            ('Source|0|.is_video|0|',
1292
-                             650)],
1293
-          'code-line': '    def is_video(self,data):\r\n',
1294
-          'first-line': 644L,
1295
-          'folded-linenos': [32L,
1296
-                             533L,
1297
-                             573L,
1298
-                             684L,
1299
-                             756L,
1300
-                             863L,
1301
-                             914L,
1302
-                             962L],
1303
-          'sel-line': 650L,
1304
-          'sel-line-start': 36967L,
1305
-          'selection_end': 36995L,
1306
-          'selection_start': 36995L,
1286
+                             26),
1287
+                            ('Source|0|.get_channels2|0|',
1288
+                             705)],
1289
+          'code-line': '        r= self.call2("tiesraide")\r\n',
1290
+          'first-line': 680L,
1291
+          'folded-linenos': [188L,
1292
+                             581L],
1293
+          'sel-line': 708L,
1294
+          'sel-line-start': 39912L,
1295
+          'selection_end': 39932L,
1296
+          'selection_start': 39928L,
1307 1297
           'zoom': 0L},
1308
-         1570341964.874],
1298
+         1570430158.551],
1309 1299
         [loc('sources/ltc.py'),
1310 1300
          {'attrib-starts': [('Source|0|',
1311 1301
                              26),
1312
-                            ('Source|0|.get_content|0|',
1313
-                             78)],
1314
-          'code-line': '            else:\r\n',
1315
-          'first-line': 185L,
1302
+                            ('Source|0|.call|0|',
1303
+                             799)],
1304
+          'code-line': '    def call(self, data,params = None, headers=None)'\
1305
+                       ':\r\n',
1306
+          'first-line': 0L,
1316 1307
           'folded-linenos': [188L,
1317 1308
                              581L],
1318
-          'sel-line': 215L,
1319
-          'sel-line-start': 11002L,
1320
-          'selection_end': 11019L,
1321
-          'selection_start': 11019L,
1309
+          'sel-line': 799L,
1310
+          'sel-line-start': 43354L,
1311
+          'selection_end': 43366L,
1312
+          'selection_start': 43362L,
1322 1313
           'zoom': 0L},
1323
-         1570344509.586],
1324
-        [loc('sources/ltc2.py'),
1314
+         1570430180.677],
1315
+        [loc('sources/ltc.py'),
1325 1316
          {'attrib-starts': [('Source|0|',
1326
-                             30),
1327
-                            ('Source|0|.is_video|0|',
1328
-                             650)],
1329
-          'code-line': '    def is_video(self,data):\r\n',
1330
-          'first-line': 644L,
1331
-          'folded-linenos': [32L,
1332
-                             533L,
1333
-                             573L,
1334
-                             684L,
1335
-                             756L,
1336
-                             863L,
1337
-                             914L,
1338
-                             962L],
1339
-          'sel-line': 650L,
1340
-          'sel-line-start': 36967L,
1341
-          'selection_end': 36995L,
1342
-          'selection_start': 36995L,
1317
+                             26),
1318
+                            ('Source|0|.call|0|',
1319
+                             799)],
1320
+          'code-line': '        url = self.api_url + data\r\n',
1321
+          'first-line': 781L,
1322
+          'folded-linenos': [188L,
1323
+                             581L],
1324
+          'sel-line': 802L,
1325
+          'sel-line-start': 43500L,
1326
+          'selection_end': 43522L,
1327
+          'selection_start': 43519L,
1343 1328
           'zoom': 0L},
1344
-         1570344559.639],
1345
-        [loc('sources/lmt.py'),
1329
+         1570430182.929],
1330
+        [loc('sources/ltc.py'),
1346 1331
          {'attrib-starts': [('Source|0|',
1347
-                             32),
1348
-                            ('Source|0|.get_streams|0|',
1349
-                             134)],
1350
-          'code-line': '                raise Exception("No stream found")\r'\
1351
-                       '\n',
1352
-          'first-line': 208L,
1353
-          'folded-linenos': [],
1354
-          'sel-line': 217L,
1355
-          'sel-line-start': 9700L,
1356
-          'selection_end': 9739L,
1357
-          'selection_start': 9736L,
1332
+                             26),
1333
+                            ('Source|0|.call|0|',
1334
+                             799)],
1335
+          'code-line': '        url = self.api_url + data\r\n',
1336
+          'first-line': 781L,
1337
+          'folded-linenos': [188L,
1338
+                             581L],
1339
+          'sel-line': 802L,
1340
+          'sel-line-start': 43500L,
1341
+          'selection_end': 43526L,
1342
+          'selection_start': 43519L,
1358 1343
           'zoom': 0L},
1359
-         1570344562.963],
1360
-        [loc('ContentSources.py'),
1361
-         {'attrib-starts': [('ContentSources|0|',
1362
-                             16),
1363
-                            ('ContentSources|0|.get_content|0|',
1364
-                             66)],
1365
-          'code-line': '                        source2 = item[1].split("::"'\
1366
-                       ')[0]\r\n',
1367
-          'first-line': 14L,
1368
-          'folded-linenos': [20L,
1369
-                             66L,
1370
-                             98L,
1371
-                             130L,
1372
-                             154L,
1373
-                             163L],
1374
-          'sel-line': 74L,
1375
-          'sel-line-start': 3226L,
1376
-          'selection_end': 3226L,
1377
-          'selection_start': 3226L,
1344
+         1570430185.146],
1345
+        [loc('sources/ltc.py'),
1346
+         {'attrib-starts': [],
1347
+          'code-line': '#\r\n',
1348
+          'first-line': 0L,
1349
+          'folded-linenos': [188L,
1350
+                             581L],
1351
+          'sel-line': 6L,
1352
+          'sel-line-start': 288L,
1353
+          'selection_end': 289L,
1354
+          'selection_start': 289L,
1378 1355
           'zoom': 0L},
1379
-         1570344569.042],
1380
-        [loc('sources/viaplay.py'),
1356
+         1570430191.366],
1357
+        [loc('sources/ltc.py'),
1381 1358
          {'attrib-starts': [('Source|0|',
1382
-                             36),
1359
+                             26),
1383 1360
                             ('Source|0|.__init__|0|',
1384
-                             38)],
1385
-          'code-line': '        self.url = "https://viaplay.lv/"\r\n',
1386
-          'first-line': 37L,
1387
-          'folded-linenos': [],
1388
-          'sel-line': 44L,
1389
-          'sel-line-start': 1383L,
1390
-          'selection_end': 1423L,
1391
-          'selection_start': 1423L,
1392
-          'zoom': 0L},
1393
-         1570344570.704],
1394
-        [loc('ContentSources.py'),
1395
-         {'attrib-starts': [('ContentSources|0|',
1396
-                             16),
1397
-                            ('ContentSources|0|.get_content|0|',
1398
-                             66)],
1399
-          'code-line': '                        source2 = item[1].split("::"'\
1400
-                       ')[0]\r\n',
1401
-          'first-line': 14L,
1402
-          'folded-linenos': [20L,
1403
-                             66L,
1404
-                             98L,
1405
-                             130L,
1406
-                             154L,
1407
-                             163L],
1408
-          'sel-line': 74L,
1409
-          'sel-line-start': 3226L,
1410
-          'selection_end': 3226L,
1411
-          'selection_start': 3226L,
1361
+                             28)],
1362
+          'code-line': '    def __init__(self,cfg_path=None):\r\n',
1363
+          'first-line': 15L,
1364
+          'folded-linenos': [188L,
1365
+                             581L],
1366
+          'sel-line': 28L,
1367
+          'sel-line-start': 1066L,
1368
+          'selection_end': 1103L,
1369
+          'selection_start': 1103L,
1412 1370
           'zoom': 0L},
1413
-         1570344572.274],
1414
-        [loc('sources/filmas.py'),
1371
+         1570430213.15],
1372
+        [loc('sources/ltc.py'),
1415 1373
          {'attrib-starts': [('Source|0|',
1416
-                             36),
1417
-                            ('Source|0|.get_content|0|',
1418
-                             59)],
1419
-          'code-line': '                    data2 = "movie/%s" % it["value"]'\
1420
-                       '\r\n',
1421
-          'first-line': 77L,
1422
-          'folded-linenos': [],
1423
-          'sel-line': 85L,
1424
-          'sel-line-start': 3702L,
1425
-          'selection_end': 3739L,
1426
-          'selection_start': 3739L,
1374
+                             26),
1375
+                            ('Source|0|.get_channels|0|',
1376
+                             677)],
1377
+          'code-line': '        self.ch=[]\r\n',
1378
+          'first-line': 671L,
1379
+          'folded-linenos': [188L,
1380
+                             581L],
1381
+          'sel-line': 683L,
1382
+          'sel-line-start': 39120L,
1383
+          'selection_end': 39184L,
1384
+          'selection_start': 39138L,
1427 1385
           'zoom': 0L},
1428
-         1570344573.237],
1429
-        [loc('sources/lmt.py'),
1386
+         1570430332.535],
1387
+        [loc('sources/ltc.py'),
1430 1388
          {'attrib-starts': [('Source|0|',
1431
-                             32),
1432
-                            ('Source|0|.get_streams|0|',
1433
-                             134)],
1434
-          'code-line': '            return [stream]\r\n',
1435
-          'first-line': 148L,
1436
-          'folded-linenos': [],
1437
-          'sel-line': 161L,
1438
-          'sel-line-start': 7012L,
1439
-          'selection_end': 7012L,
1440
-          'selection_start': 7012L,
1389
+                             26),
1390
+                            ('Source|0|.get_channels|0|',
1391
+                             677)],
1392
+          'code-line': '        self.ch=[]\r\n',
1393
+          'first-line': 671L,
1394
+          'folded-linenos': [188L,
1395
+                             581L],
1396
+          'sel-line': 683L,
1397
+          'sel-line-start': 39120L,
1398
+          'selection_end': 39120L,
1399
+          'selection_start': 39120L,
1441 1400
           'zoom': 0L},
1442
-         1570344791.036],
1443
-        [loc('run.py'),
1444
-         {'attrib-starts': [('Main|0|',
1445
-                             22),
1446
-                            ('Main|0|.play_video|0|',
1447
-                             242)],
1448
-          'code-line': '        if show_info: # Izsauc pilno Info logu\r\n',
1449
-          'first-line': 252L,
1450
-          'folded-linenos': [],
1451
-          'sel-line': 262L,
1452
-          'sel-line-start': 10328L,
1453
-          'selection_end': 10328L,
1454
-          'selection_start': 10328L,
1401
+         1572652176.342],
1402
+        [loc('sources/tvplay.py'),
1403
+         {'attrib-starts': [],
1404
+          'code-line': 'headers2dict = lambda  h: dict([l.strip().split(": "'\
1405
+                       ') for l in h.strip().splitlines()])\r\n',
1406
+          'first-line': 23L,
1407
+          'folded-linenos': [159L],
1408
+          'sel-line': 28L,
1409
+          'sel-line-start': 732L,
1410
+          'selection_end': 800L,
1411
+          'selection_start': 797L,
1455 1412
           'zoom': 0L},
1456
-         1570344834.248],
1457
-        [loc('sources/lmt.py'),
1413
+         1572652176.378],
1414
+        [loc('sources/tvplay.py'),
1458 1415
          {'attrib-starts': [('Source|0|',
1459 1416
                              32),
1460
-                            ('Source|0|.get_streams|0|',
1461
-                             134)],
1462
-          'code-line': '            data2 = YouTubeVideoUrl().extract(video_'\
1463
-                       'id)\r\n',
1464
-          'first-line': 169L,
1417
+                            ('Source|0|.get_content|0|',
1418
+                             62)],
1419
+          'code-line': '                        data2 = "tvSeries/%s" % item'\
1420
+                       '["id"]\r\n',
1421
+          'first-line': 148L,
1422
+          'folded-linenos': [162L],
1423
+          'sel-line': 152L,
1424
+          'sel-line-start': 7061L,
1425
+          'selection_end': 7061L,
1426
+          'selection_start': 7061L,
1427
+          'zoom': 0L},
1428
+         1572950510.295],
1429
+        [loc('build/PlayStream/setuptools-27.2.0-py2.7.egg/pkg_resources/_vendor/appdirs.py'),
1430
+         {'attrib-starts': [],
1431
+          'code-line': '#!/usr/bin/env python\n',
1432
+          'first-line': 0L,
1465 1433
           'folded-linenos': [],
1466
-          'sel-line': 172L,
1467
-          'sel-line-start': 7468L,
1468
-          'selection_end': 7503L,
1469
-          'selection_start': 7488L,
1434
+          'sel-line': 0L,
1435
+          'sel-line-start': 0L,
1436
+          'selection_end': 0L,
1437
+          'selection_start': 0L,
1470 1438
           'zoom': 0L},
1471
-         1570353608.209],
1472
-        [loc('sources/lmt.py'),
1439
+         1572950510.522],
1440
+        [loc('dist/PlayStream/tcl/tzdata/Africa/Addis_Ababa'),
1473 1441
          {'attrib-starts': [],
1474
-          'code-line': 'from YouTubeVideoUrl import YouTubeVideoUrl\r\n',
1475
-          'first-line': 16L,
1442
+          'code-line': '# created by tools/tclZIC.tcl - do not edit\n',
1443
+          'first-line': 0L,
1476 1444
           'folded-linenos': [],
1477
-          'sel-line': 26L,
1478
-          'sel-line-start': 685L,
1479
-          'selection_end': 705L,
1480
-          'selection_start': 690L,
1445
+          'sel-line': 0L,
1446
+          'sel-line-start': 0L,
1447
+          'selection_end': 0L,
1448
+          'selection_start': 0L,
1481 1449
           'zoom': 0L},
1482
-         1570353641.164],
1483
-        [loc('resolvers/youtuberesolver.py'),
1484
-         {'attrib-starts': [('YoutubePlayer|0|',
1485
-                             178)],
1486
-          'code-line': 'class YoutubePlayer(object):\n',
1450
+         1572950515.272],
1451
+        [loc('build/PlayStream/setuptools-27.2.0-py2.7.egg/pkg_resources/_vendor/appdirs.py'),
1452
+         {'attrib-starts': [],
1453
+          'code-line': '#!/usr/bin/env python\n',
1487 1454
           'first-line': 0L,
1488
-          'folded-linenos': [5L,
1489
-                             154L,
1490
-                             178L],
1491
-          'sel-line': 178L,
1492
-          'sel-line-start': 7059L,
1493
-          'selection_end': 7087L,
1494
-          'selection_start': 7087L,
1455
+          'folded-linenos': [],
1456
+          'sel-line': 0L,
1457
+          'sel-line-start': 0L,
1458
+          'selection_end': 0L,
1459
+          'selection_start': 0L,
1495 1460
           'zoom': 0L},
1496
-         1570392761.044],
1497
-        [loc('sources/ltc.py'),
1461
+         1572950519.71],
1462
+        [loc('sources/tvplay.py'),
1498 1463
          {'attrib-starts': [('Source|0|',
1499
-                             26),
1464
+                             32),
1500 1465
                             ('Source|0|.get_content|0|',
1501
-                             78)],
1502
-          'code-line': '            else:\r\n',
1503
-          'first-line': 248L,
1504
-          'folded-linenos': [188L,
1505
-                             581L],
1506
-          'sel-line': 215L,
1507
-          'sel-line-start': 11002L,
1508
-          'selection_end': 11019L,
1509
-          'selection_start': 11019L,
1466
+                             62)],
1467
+          'code-line': '                        data2 = "tvSeries/%s" % item'\
1468
+                       '["id"]\r\n',
1469
+          'first-line': 148L,
1470
+          'folded-linenos': [162L],
1471
+          'sel-line': 152L,
1472
+          'sel-line-start': 7061L,
1473
+          'selection_end': 7061L,
1474
+          'selection_start': 7061L,
1510 1475
           'zoom': 0L},
1511
-         1570392808.59],
1512
-        [loc('sources/ltc.py'),
1476
+         1572950539.983],
1477
+        [loc('sources/lmt.py'),
1513 1478
          {'attrib-starts': [('Source|0|',
1514
-                             26),
1515
-                            ('Source|0|.get_arhivs_url|0|',
1516
-                             911)],
1517
-          'code-line': '        #headers["Cookie"] = "%s; %s; MobBitr=1; "%('\
1518
-                       'self.session_id,self.mobtv_cache)\r\n',
1519
-          'first-line': 901L,
1520
-          'folded-linenos': [188L,
1521
-                             581L],
1522
-          'sel-line': 916L,
1523
-          'sel-line-start': 48206L,
1524
-          'selection_end': 48234L,
1525
-          'selection_start': 48234L,
1479
+                             32),
1480
+                            ('Source|0|.get_content|0|',
1481
+                             52)],
1482
+          'code-line': '                ("B\xc4\x93rniem", "lmt::video/berni'\
1483
+                       'em?videoPage=1", "", "Sports"),\r\n',
1484
+          'first-line': 54L,
1485
+          'folded-linenos': [],
1486
+          'sel-line': 64L,
1487
+          'sel-line-start': 2313L,
1488
+          'selection_end': 2361L,
1489
+          'selection_start': 2361L,
1526 1490
           'zoom': 0L},
1527
-         1570392834.588]],
1491
+         1572966407.187]],
1528 1492
         20),
1529
-        'current-loc': loc('sources/ltc.py'),
1493
+        'current-loc': loc('sources/tvplay.py'),
1530 1494
         'editor-state-list': [(loc('sources/ltc2.py'),
1531 1495
                                {'attrib-starts': [('Source|0|',
1532 1496
         30),
@@ -1551,27 +1515,30 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1551 1515
                               (loc('sources/ltc.py'),
1552 1516
                                {'attrib-starts': [('Source|0|',
1553 1517
         26),
1554
-        ('Source|0|.get_content|0|',
1555
-         78)],
1556
-                                'code-line': '\r\n',
1557
-                                'first-line': 612L,
1518
+        ('Source|0|.get_channels|0|',
1519
+         677)],
1520
+                                'code-line': '        self.ch=[]\r\n',
1521
+                                'first-line': 671L,
1558 1522
                                 'folded-linenos': [188L,
1559 1523
         581L],
1560
-                                'sel-line': 571L,
1561
-                                'sel-line-start': 33930L,
1562
-                                'selection_end': 33930L,
1563
-                                'selection_start': 33930L,
1524
+                                'sel-line': 683L,
1525
+                                'sel-line-start': 39120L,
1526
+                                'selection_end': 39120L,
1527
+                                'selection_start': 39120L,
1564 1528
                                 'zoom': 0L}),
1565 1529
                               (loc('sources/lmt.py'),
1566
-                               {'attrib-starts': [],
1567
-                                'code-line': 'from YouTubeVideoUrl import Yo'\
1568
-        'uTubeVideoUrl\r\n',
1569
-                                'first-line': 16L,
1530
+                               {'attrib-starts': [('Source|0|',
1531
+        32),
1532
+        ('Source|0|.get_content|0|',
1533
+         52)],
1534
+                                'code-line': '                ("B\xc4\x93rni'\
1535
+        'em", "lmt::video/berniem?videoPage=1", "", "Sports"),\r\n',
1536
+                                'first-line': 54L,
1570 1537
                                 'folded-linenos': [],
1571
-                                'sel-line': 26L,
1572
-                                'sel-line-start': 685L,
1573
-                                'selection_end': 705L,
1574
-                                'selection_start': 690L,
1538
+                                'sel-line': 64L,
1539
+                                'sel-line-start': 2313L,
1540
+                                'selection_end': 2361L,
1541
+                                'selection_start': 2361L,
1575 1542
                                 'zoom': 0L}),
1576 1543
                               (loc('sources/filmas.py'),
1577 1544
                                {'attrib-starts': [('Source|0|',
@@ -1673,6 +1640,20 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1673 1640
                                 'sel-line-start': 7059L,
1674 1641
                                 'selection_end': 7087L,
1675 1642
                                 'selection_start': 7087L,
1643
+                                'zoom': 0L}),
1644
+                              (loc('sources/tvplay.py'),
1645
+                               {'attrib-starts': [('Source|0|',
1646
+        32),
1647
+        ('Source|0|.get_content|0|',
1648
+         62)],
1649
+                                'code-line': '                            de'\
1650
+        'sc.append(item["titles"]["LV"]["summaryLong"])\r\n',
1651
+                                'first-line': 139L,
1652
+                                'folded-linenos': [],
1653
+                                'sel-line': 163L,
1654
+                                'sel-line-start': 7884L,
1655
+                                'selection_end': 7957L,
1656
+                                'selection_start': 7957L,
1676 1657
                                 'zoom': 0L})],
1677 1658
         'has-focus': True,
1678 1659
         'locked': False},
@@ -1685,24 +1666,26 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1685 1666
          loc('bottle.py'),
1686 1667
          loc('ltcproxy.py'),
1687 1668
          loc('ContentSources.py'),
1688
-         loc('resolvers/youtuberesolver.py')]),
1669
+         loc('resolvers/youtuberesolver.py'),
1670
+         loc('sources/tvplay.py')]),
1689 1671
                                'open_files': [u'ContentSources.py',
1690 1672
         u'bottle.py',
1691 1673
         u'ltcproxy.py',
1692 1674
         u'playstreamproxy.py',
1675
+        u'resolvers/youtuberesolver.py',
1693 1676
         u'run.py',
1694 1677
         u'sources/filmas.py',
1695
-        u'sources/lmt.py',
1678
+        u'sources/ltc.py',
1696 1679
         u'sources/ltc2.py',
1697
-        u'resolvers/youtuberesolver.py',
1698
-        u'sources/ltc.py']},
1680
+        u'sources/lmt.py',
1681
+        u'sources/tvplay.py']},
1699 1682
         'saved_notebook_display': None,
1700
-        'split_percents': {0: 0.5565410199556541},
1683
+        'split_percents': {0: 0.5046808510638298},
1701 1684
         'splits': 2,
1702 1685
         'tab_location': 'top',
1703 1686
         'traversal_pos': ((0,
1704
-                           4),
1705
-                          1570353598.843),
1687
+                           2),
1688
+                          1572966469.303),
1706 1689
         'user_data': {}},
1707 1690
                  'saved_notebook_display': None,
1708 1691
                  'split_percents': {0: 0.5},
@@ -1712,14 +1695,15 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1712 1695
                                     0),
1713 1696
                                    1561819013.904),
1714 1697
                  'user_data': {}},
1715
-        'window-alloc': (414,
1716
-                         0,
1717
-                         928,
1718
-                         550)}]}
1719
-guimgr.recent-documents = [loc('sources/ltc.py'),
1720
-                           loc('resolvers/youtuberesolver.py'),
1721
-                           loc('sources/ltc2.py'),
1698
+        'window-alloc': (345,
1699
+                         -1200,
1700
+                         918,
1701
+                         600)}]}
1702
+guimgr.recent-documents = [loc('sources/tvplay.py'),
1722 1703
                            loc('sources/lmt.py'),
1704
+                           loc('sources/ltc.py'),
1705
+                           loc('sources/ltc2.py'),
1706
+                           loc('resolvers/youtuberesolver.py'),
1723 1707
                            loc('run.py'),
1724 1708
                            loc('sources/filmas.py'),
1725 1709
                            loc('ContentSources.py'),
@@ -1760,6 +1744,16 @@ guimgr.visual-state = {loc('ContentSources.py'): {'attrib-starts': [('Conten'\
1760 1744
         'sel-line-start': 42625L,
1761 1745
         'selection_end': 42625L,
1762 1746
         'selection_start': 42625L,
1747
+        'zoom': 0L},
1748
+                       loc('build/PlayStream/setuptools-27.2.0-py2.7.egg/pkg_resources/_vendor/appdirs.py'): {'a'\
1749
+        'ttrib-starts': [],
1750
+        'code-line': '#!/usr/bin/env python\n',
1751
+        'first-line': 0L,
1752
+        'folded-linenos': [],
1753
+        'sel-line': 0L,
1754
+        'sel-line-start': 0L,
1755
+        'selection_end': 0L,
1756
+        'selection_start': 0L,
1763 1757
         'zoom': 0L},
1764 1758
                        loc('changelog.md'): {'attrib-starts': [],
1765 1759
         'first-line': 0L,
@@ -1786,6 +1780,16 @@ guimgr.visual-state = {loc('ContentSources.py'): {'attrib-starts': [('Conten'\
1786 1780
         'sel-line-start': 494L,
1787 1781
         'selection_end': 560L,
1788 1782
         'selection_start': 560L,
1783
+        'zoom': 0L},
1784
+                       loc('dist/PlayStream/tcl/tzdata/Africa/Addis_Ababa'): {'a'\
1785
+        'ttrib-starts': [],
1786
+        'code-line': '# created by tools/tclZIC.tcl - do not edit\n',
1787
+        'first-line': 0L,
1788
+        'folded-linenos': [],
1789
+        'sel-line': 0L,
1790
+        'sel-line-start': 0L,
1791
+        'selection_end': 0L,
1792
+        'selection_start': 0L,
1789 1793
         'zoom': 0L},
1790 1794
                        loc('iub.py'): {'attrib-starts': [('get_table',
1791 1795
         51)],
@@ -2735,7 +2739,8 @@ search.replace-history = [u'filmix.co',
2735 2739
                           u'https://replay.lsm.lv',
2736 2740
                           u'www.shortcut.lv',
2737 2741
                           u'shortcut.lv']
2738
-search.search-history = [u'arh\u012bv',
2742
+search.search-history = [u'api_url',
2743
+                         u'arh\u012bv',
2739 2744
                          u'b\u0113rn',
2740 2745
                          u'b\u0113rnn',
2741 2746
                          u'217',
@@ -2753,8 +2758,7 @@ search.search-history = [u'arh\u012bv',
2753 2758
                          u'debug',
2754 2759
                          u'opening',
2755 2760
                          u'chag',
2756
-                         u'print',
2757
-                         u'return con']
2761
+                         u'print']
2758 2762
 testing.stored-results = (1,
2759 2763
                           [],
2760 2764
                           {})

+ 1
- 0
sources/lmt.py Visa fil

@@ -62,6 +62,7 @@ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
62 62
                 ("Straumes", "lmt::straumes","","Tiešraides un aktuāli video"),
63 63
                 #("TV", "lmt::tv","","TV tiešraides (tikai LMT tīklā)"),
64 64
                 ("Jaunākie", "lmt::video/jaunakie?videoPage=1", "", "Visu žanru jaunākie video"),
65
+                ("Bērniem", "lmt::video/berniem?videoPage=1", "", "Sports"),
65 66
                 ("Sports", "lmt::video/sports?videoPage=1", "", "Sports"),
66 67
                 ("Kultūra un māksla", "lmt::video/kultura?videoPage=1", "", "Kultūra un māksla"),
67 68
                 ("Konferences", "lmt::video/konferences?videoPage=1", "", "Konferences"),

+ 17
- 8
sources/tvplay.py Visa fil

@@ -149,14 +149,23 @@ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
149 149
                         #tvseries_id = item["id"]
150 150
                     #else:
151 151
                        # tvseries_id = item["seasonIds"][0]
152
-                    data2 = "tvSeries/%s" % item["id"]
153
-                    title = item["title"]["title"]
154
-                    img = "http://login.tvplayhome.lt:8081" + item["posterUrl"] if "posterUrl" in item else self.img
155
-                    desc = []
156
-                    if "summaryLong" in  item["title"]:
157
-                        desc.append(item["title"]["summaryLong"])
158
-                    desc = "\n".join(desc)
159
-                    content.append((title, self.name+"::"+data2, img, desc))
152
+                    try:
153
+                        data2 = "tvSeries/%s" % item["id"]
154
+                        title = item["title"]["title"] if "title" in  item["title"] else item["titles"]["LV"]["title"]
155
+                        img = "http://login.tvplayhome.lt:8081" + item["posterUrl"] if "posterUrl" in item else self.img
156
+                        desc = []
157
+                        if "summaryShort" in  item["title"]:
158
+                            desc.append(item["title"]["summaryShort"])
159
+                        elif "summaryShort" in  item["titles"]["LV"]:
160
+                            desc.append(item["titles"]["LV"]["summaryShort"])
161
+                        if "summaryLong" in  item["title"]:
162
+                            desc.append(item["title"]["summaryLong"])
163
+                        elif "summaryLong" in  item["titles"]["LV"]:
164
+                            desc.append(item["titles"]["LV"]["summaryLong"])
165
+                        desc = "\n".join(desc)
166
+                        content.append((title, self.name+"::"+data2, img, desc))
167
+                    except:
168
+                        return content
160 169
             if "page" in qs:
161 170
                 page = int(qs["page"]) + 1
162 171
                 data2 = re.sub("page=\d+", "page=%s" % page, data)