Browse Source

ltc,replay live epg u.c.

Ivars 6 years ago
parent
commit
bb1e3df422
6 changed files with 330 additions and 295 deletions
  1. 1
    0
      ContentSources.py
  2. 311
    285
      project.wpr
  3. 5
    4
      sources/filmix.py
  4. 3
    2
      sources/ltc.py
  5. 9
    3
      sources/replay.py
  6. 1
    1
      util.py

+ 1
- 0
ContentSources.py View File

78
                         for el in item:
78
                         for el in item:
79
                             if isinstance(el,unicode):
79
                             if isinstance(el,unicode):
80
                                 el = el.encode("utf8")
80
                                 el = el.encode("utf8")
81
+                            el = util.unescape(el)
81
                             item2.append(el)
82
                             item2.append(el)
82
                         content.append(tuple(item2))
83
                         content.append(tuple(item2))
83
                 else:
84
                 else:

+ 311
- 285
project.wpr View File

122
         None,
122
         None,
123
         1,
123
         1,
124
         0)},
124
         0)},
125
-                     loc('sources/ltc.py'): {79L: (0,
125
+                     loc('sources/replay.py'): {255L: (0,
126
         None,
126
         None,
127
         1,
127
         1,
128
         0)},
128
         0)},
129
-                     loc('sources/replay.py'): {77L: (0,
130
-        None,
131
-        1,
132
-        0),
133
-        249L: (0,
134
-               None,
135
-               1,
136
-               0)},
137
                      loc('sources/tvdom.py'): {292L: (0,
129
                      loc('sources/tvdom.py'): {292L: (0,
138
         None,
130
         None,
139
         1,
131
         1,
158
             None,
150
             None,
159
             1,
151
             1,
160
             0)},
152
             0)},
161
-                     loc('unknown:<untitled> #1'): {2: (0,
153
+                     loc('unknown:<untitled> #2'): {10: (0,
162
         None,
154
         None,
163
         1,
155
         1,
164
         0)},
156
         0)},
165
-                     loc('unknown:<untitled> #2'): {10: (0,
157
+                     loc('unknown:<untitled> #1'): {2: (0,
166
         None,
158
         None,
167
         1,
159
         1,
168
         0)}}
160
         0)}}
177
                     loc('sources/euronews.py'): {},
169
                     loc('sources/euronews.py'): {},
178
                     loc('sources/filmix.py'): {},
170
                     loc('sources/filmix.py'): {},
179
                     loc('sources/ltc.py'): {},
171
                     loc('sources/ltc.py'): {},
172
+                    loc('sources/replay.py'): {},
180
                     loc('test_sources2.py'): {}}
173
                     loc('test_sources2.py'): {}}
181
 debug.recent-run-args = {loc('ContentSources.py'): [u'config::home streams_bernu.cfg',
174
 debug.recent-run-args = {loc('ContentSources.py'): [u'config::home streams_bernu.cfg',
182
         u'ltc::home',
175
         u'ltc::home',
265
                                {'tree-state': {'file-sort-method': 'by name',
258
                                {'tree-state': {'file-sort-method': 'by name',
266
         'list-files-first': 0,
259
         'list-files-first': 0,
267
         'tree-states': {'deep': {'expanded-nodes': [(1,)],
260
         'tree-states': {'deep': {'expanded-nodes': [(1,)],
268
-                                 'selected-nodes': [(15,)],
261
+                                 'selected-nodes': [(16,)],
269
                                  'top-node': (0,)}},
262
                                  'top-node': (0,)}},
270
         'tree-style': 'deep'}}),
263
         'tree-style': 'deep'}}),
271
                               ('snippets',
264
                               ('snippets',
784
         'top-node': [('generic attribute',
777
         'top-node': [('generic attribute',
785
                       loc('../../../../../Python27/lib/site-packages/PIL/Image.py'),
778
                       loc('../../../../../Python27/lib/site-packages/PIL/Image.py'),
786
                       'ADAPTIVE')]},
779
                       'ADAPTIVE')]},
787
-        loc('unknown:<untitled> #6'): {'expanded-nodes': [],
788
-                                       'selected-nodes': [],
789
-                                       'top-node': None},
790
-        loc('unknown:<untitled> #4'): {'expanded-nodes': [],
780
+        loc('unknown:<untitled> #6'): {'column-widths': [1.0],
781
+                                       'expanded-nodes': [],
791
                                        'selected-nodes': [],
782
                                        'selected-nodes': [],
792
                                        'top-node': None},
783
                                        'top-node': None},
793
         loc('unknown:<untitled> #5'): {'column-widths': [1.0],
784
         loc('unknown:<untitled> #5'): {'column-widths': [1.0],
794
                                        'expanded-nodes': [],
785
                                        'expanded-nodes': [],
795
                                        'selected-nodes': [],
786
                                        'selected-nodes': [],
796
                                        'top-node': None},
787
                                        'top-node': None},
797
-        loc('unknown:<untitled> #3'): {'column-widths': [1.0],
798
-                                       'expanded-nodes': [],
788
+        loc('unknown:<untitled> #4'): {'expanded-nodes': [],
789
+                                       'selected-nodes': [],
790
+                                       'top-node': None},
791
+        loc('unknown:<untitled> #3'): {'expanded-nodes': [],
799
                                        'selected-nodes': [],
792
                                        'selected-nodes': [],
800
                                        'top-node': None}},
793
                                        'top-node': None}},
801
                                 'browse_mode': u'Current Module',
794
                                 'browse_mode': u'Current Module',
858
                                        'fRegexFlags': 46,
851
                                        'fRegexFlags': 46,
859
                                        'fReplaceText': u'www.shortcut.lv',
852
                                        'fReplaceText': u'www.shortcut.lv',
860
                                        'fReverse': False,
853
                                        'fReverse': False,
861
-                                       'fSearchText': u'raise',
854
+                                       'fSearchText': u'img',
862
                                        'fStartPos': 0,
855
                                        'fStartPos': 0,
863
                                        'fStyle': 'text',
856
                                        'fStyle': 'text',
864
                                        'fWholeWords': False,
857
                                        'fWholeWords': False,
932
         -1,
925
         -1,
933
         -1),
926
         -1),
934
                        'attrib-starts': [],
927
                        'attrib-starts': [],
935
-                       'first-line': 0L,
928
+                       'first-line': 56L,
936
                        'folded-linenos': [],
929
                        'folded-linenos': [],
937
-                       'history': {},
930
+                       'history': {u'file:C:/Data/Programming/enigma2/PlayStream2/content/run.py': ['r'\
931
+        '\n',
932
+        'self.url+data\n',
933
+        'r.content\n',
934
+        'r.cookies\n',
935
+        'r.cookies.keys()\n',
936
+        'cookie\n',
937
+        'data\n',
938
+        'headers\n',
939
+        'print data\n'],
940
+                                   u'file:C:/Data/Programming/enigma2/PlayStream2/content/sources/ltc.py': ['e'\
941
+        'pg\n',
942
+        'desc\n',
943
+        'title\n'],
944
+                                   u'file:C:/Data/Programming/enigma2/PlayStream2/content/sources/replay.py': ['d'\
945
+        'esc\n',
946
+        'print desc\n',
947
+        'title\n',
948
+        'item\n',
949
+        'item[0]\n',
950
+        'item[0].split("theme=")\n',
951
+        'item[0].split("theme=")[1]\n']},
938
                        'launch-id': None,
952
                        'launch-id': None,
939
-                       'sel-line': 0L,
940
-                       'sel-line-start': 0L,
941
-                       'selection_end': 0L,
942
-                       'selection_start': 0L,
953
+                       'sel-line': 67L,
954
+                       'sel-line-start': 2424L,
955
+                       'selection_end': 2424L,
956
+                       'selection_start': 2424L,
943
                        'zoom': 0L}),
957
                        'zoom': 0L}),
944
                      ('debug-watch',
958
                      ('debug-watch',
945
                       'wide',
959
                       'wide',
947
                       {'node-states': [('eval',
961
                       {'node-states': [('eval',
948
         u'js'),
962
         u'js'),
949
                                        ('eval',
963
                                        ('eval',
950
-        u'cur'),
964
+        u'title'),
951
                                        ('eval',
965
                                        ('eval',
952
-        u'article'),
966
+        u'theme'),
953
                                        ('eval',
967
                                        ('eval',
954
         u'item')],
968
         u'item')],
955
                        'tree-state': {'expanded-nodes': [],
969
                        'tree-state': {'expanded-nodes': [],
956
-                                      'selected-nodes': [(1,)],
970
+                                      'selected-nodes': [(2,)],
957
                                       'top-node': (0,)}}),
971
                                       'top-node': (0,)}}),
958
                      ('messages',
972
                      ('messages',
959
                       'wide',
973
                       'wide',
985
                        'selection_end': 174L,
999
                        'selection_end': 174L,
986
                        'selection_start': 174L,
1000
                        'selection_start': 174L,
987
                        'zoom': 0L})],
1001
                        'zoom': 0L})],
988
-        'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('resolvers/cloudsany.py'),
989
-        {'attrib-starts': [('resolve',
990
-                            30)],
991
-         'first-line': 47L,
1002
+        'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('ContentSources.py'),
1003
+        {'attrib-starts': [('ContentSources',
1004
+                            16),
1005
+                           ('ContentSources.__init__',
1006
+                            20)],
1007
+         'first-line': 54L,
992
          'folded-linenos': [],
1008
          'folded-linenos': [],
993
-         'sel-line': 52L,
994
-         'sel-line-start': 1489L,
995
-         'selection_end': 1527L,
996
-         'selection_start': 1514L,
1009
+         'sel-line': 61L,
1010
+         'sel-line-start': 2639L,
1011
+         'selection_end': 2704L,
1012
+         'selection_start': 2700L,
997
          'zoom': 0L},
1013
          'zoom': 0L},
998
-        1513039026.067],
999
-        [loc('resolvers/cloudsany.py'),
1000
-         {'attrib-starts': [('resolve',
1001
-                             30)],
1002
-          'first-line': 63L,
1014
+        1518896761.573],
1015
+        [loc('ContentSources.py'),
1016
+         {'attrib-starts': [('ContentSources',
1017
+                             16),
1018
+                            ('ContentSources.get_streams',
1019
+                             96)],
1020
+          'first-line': 97L,
1003
           'folded-linenos': [],
1021
           'folded-linenos': [],
1004
-          'sel-line': 85L,
1005
-          'sel-line-start': 2581L,
1006
-          'selection_end': 2619L,
1007
-          'selection_start': 2606L,
1022
+          'sel-line': 106L,
1023
+          'sel-line-start': 4586L,
1024
+          'selection_end': 4611L,
1025
+          'selection_start': 4607L,
1008
           'zoom': 0L},
1026
           'zoom': 0L},
1009
-         1513039049.916],
1010
-        [loc('resolvers/cloudsany.py'),
1011
-         {'attrib-starts': [('resolve',
1012
-                             30)],
1013
-          'first-line': 75L,
1027
+         1518896762.565],
1028
+        [loc('ContentSources.py'),
1029
+         {'attrib-starts': [('ContentSources',
1030
+                             16),
1031
+                            ('ContentSources.get_streams',
1032
+                             96)],
1033
+          'first-line': 114L,
1014
           'folded-linenos': [],
1034
           'folded-linenos': [],
1015
-          'sel-line': 85L,
1016
-          'sel-line-start': 2581L,
1017
-          'selection_end': 2619L,
1018
-          'selection_start': 2606L,
1035
+          'sel-line': 123L,
1036
+          'sel-line-start': 5221L,
1037
+          'selection_end': 5309L,
1038
+          'selection_start': 5305L,
1019
           'zoom': 0L},
1039
           'zoom': 0L},
1020
-         1513039051.812],
1021
-        [loc('resolvers/cloudsany.py'),
1022
-         {'attrib-starts': [('resolve',
1023
-                             30)],
1024
-          'first-line': 42L,
1040
+         1518896764.162],
1041
+        [loc('ContentSources.py'),
1042
+         {'attrib-starts': [('ContentSources',
1043
+                             16),
1044
+                            ('ContentSources.__init__',
1045
+                             20)],
1046
+          'first-line': 49L,
1025
           'folded-linenos': [],
1047
           'folded-linenos': [],
1026
-          'sel-line': 47L,
1027
-          'sel-line-start': 1343L,
1028
-          'selection_end': 1356L,
1029
-          'selection_start': 1351L,
1048
+          'sel-line': 49L,
1049
+          'sel-line-start': 2031L,
1050
+          'selection_end': 2056L,
1051
+          'selection_start': 2056L,
1030
           'zoom': 0L},
1052
           'zoom': 0L},
1031
-         1513039058.41],
1032
-        [loc('resolvers/cloudsany.py'),
1033
-         {'attrib-starts': [('resolve',
1034
-                             30)],
1035
-          'first-line': 42L,
1053
+         1518896775.095],
1054
+        [loc('ContentSources.py'),
1055
+         {'attrib-starts': [('ContentSources',
1056
+                             16),
1057
+                            ('ContentSources.get_content',
1058
+                             64)],
1059
+          'first-line': 71L,
1036
           'folded-linenos': [],
1060
           'folded-linenos': [],
1037
-          'sel-line': 52L,
1038
-          'sel-line-start': 1489L,
1039
-          'selection_end': 1502L,
1040
-          'selection_start': 1497L,
1061
+          'sel-line': 80L,
1062
+          'sel-line-start': 3634L,
1063
+          'selection_end': 3676L,
1064
+          'selection_start': 3672L,
1041
           'zoom': 0L},
1065
           'zoom': 0L},
1042
-         1513039058.793],
1043
-        [loc('resolvers/cloudsany.py'),
1044
-         {'attrib-starts': [('resolve',
1045
-                             30)],
1046
-          'first-line': 75L,
1066
+         1518896776.269],
1067
+        [loc('ContentSources.py'),
1068
+         {'attrib-starts': [('ContentSources',
1069
+                             16),
1070
+                            ('ContentSources.get_content',
1071
+                             64)],
1072
+          'first-line': 77L,
1047
           'folded-linenos': [],
1073
           'folded-linenos': [],
1048
-          'sel-line': 85L,
1049
-          'sel-line-start': 2581L,
1050
-          'selection_end': 2594L,
1051
-          'selection_start': 2589L,
1074
+          'sel-line': 80L,
1075
+          'sel-line-start': 3634L,
1076
+          'selection_end': 3662L,
1077
+          'selection_start': 3662L,
1052
           'zoom': 0L},
1078
           'zoom': 0L},
1053
-         1513039059.535],
1054
-        [loc('resolvers/cloudsany.py'),
1055
-         {'attrib-starts': [('resolve',
1056
-                             30)],
1057
-          'first-line': 78L,
1079
+         1518896830.949],
1080
+        [loc('sources/replay.py'),
1081
+         {'attrib-starts': [('Source',
1082
+                             30),
1083
+                            ('Source.get_content',
1084
+                             41)],
1085
+          'first-line': 84L,
1058
           'folded-linenos': [],
1086
           'folded-linenos': [],
1059
-          'sel-line': 90L,
1060
-          'sel-line-start': 2795L,
1061
-          'selection_end': 2819L,
1062
-          'selection_start': 2819L,
1087
+          'sel-line': 85L,
1088
+          'sel-line-start': 3948L,
1089
+          'selection_end': 3948L,
1090
+          'selection_start': 3948L,
1063
           'zoom': 0L},
1091
           'zoom': 0L},
1064
-         1513039704.266],
1065
-        [loc('sources/cinemalive.py'),
1092
+         1518896951.611],
1093
+        [loc('sources/replay.py'),
1066
          {'attrib-starts': [('Source',
1094
          {'attrib-starts': [('Source',
1067
-                             29),
1068
-                            ('Source.get_streams',
1069
-                             166)],
1070
-          'first-line': 176L,
1095
+                             30),
1096
+                            ('Source.__init__',
1097
+                             32)],
1098
+          'first-line': 27L,
1071
           'folded-linenos': [],
1099
           'folded-linenos': [],
1072
-          'sel-line': 184L,
1073
-          'sel-line-start': 9045L,
1074
-          'selection_end': 9087L,
1075
-          'selection_start': 9074L,
1100
+          'sel-line': 35L,
1101
+          'sel-line-start': 1150L,
1102
+          'selection_end': 1165L,
1103
+          'selection_start': 1165L,
1076
           'zoom': 0L},
1104
           'zoom': 0L},
1077
-         1513039740.396],
1078
-        [loc('resolvers/cloudsany.py'),
1079
-         {'attrib-starts': [('resolve',
1080
-                             30)],
1081
-          'first-line': 78L,
1105
+         1518902208.605],
1106
+        [loc('sources/replay.py'),
1107
+         {'attrib-starts': [('Source',
1108
+                             30),
1109
+                            ('Source.__init__',
1110
+                             32)],
1111
+          'first-line': 32L,
1082
           'folded-linenos': [],
1112
           'folded-linenos': [],
1083
-          'sel-line': 88L,
1084
-          'sel-line-start': 2726L,
1085
-          'selection_end': 2743L,
1086
-          'selection_start': 2743L,
1113
+          'sel-line': 39L,
1114
+          'sel-line-start': 1273L,
1115
+          'selection_end': 1288L,
1116
+          'selection_start': 1287L,
1087
           'zoom': 0L},
1117
           'zoom': 0L},
1088
-         1513039768.169],
1089
-        [loc('sources/cinemalive.py'),
1118
+         1518902209.757],
1119
+        [loc('sources/replay.py'),
1090
          {'attrib-starts': [('Source',
1120
          {'attrib-starts': [('Source',
1091
-                             29),
1092
-                            ('Source.get_streams',
1093
-                             166)],
1094
-          'first-line': 176L,
1121
+                             30),
1122
+                            ('Source.get_content',
1123
+                             41)],
1124
+          'first-line': 76L,
1095
           'folded-linenos': [],
1125
           'folded-linenos': [],
1096
-          'sel-line': 184L,
1097
-          'sel-line-start': 9045L,
1098
-          'selection_end': 9087L,
1099
-          'selection_start': 9074L,
1126
+          'sel-line': 83L,
1127
+          'sel-line-start': 3857L,
1128
+          'selection_end': 3881L,
1129
+          'selection_start': 3881L,
1100
           'zoom': 0L},
1130
           'zoom': 0L},
1101
-         1513039803.617],
1102
-        [loc('resolvers/cloudsany.py'),
1103
-         {'attrib-starts': [('resolve',
1104
-                             30)],
1105
-          'first-line': 81L,
1131
+         1518902233.149],
1132
+        [loc('sources/replay.py'),
1133
+         {'attrib-starts': [('Source',
1134
+                             30),
1135
+                            ('Source.get_content',
1136
+                             41)],
1137
+          'first-line': 76L,
1106
           'folded-linenos': [],
1138
           'folded-linenos': [],
1107
-          'sel-line': 88L,
1108
-          'sel-line-start': 2726L,
1109
-          'selection_end': 2726L,
1110
-          'selection_start': 2726L,
1139
+          'sel-line': 78L,
1140
+          'sel-line-start': 3572L,
1141
+          'selection_end': 3593L,
1142
+          'selection_start': 3593L,
1111
           'zoom': 0L},
1143
           'zoom': 0L},
1112
-         1513039835.015],
1113
-        [loc('sources/cinemalive.py'),
1144
+         1518902241.094],
1145
+        [loc('sources/replay.py'),
1114
          {'attrib-starts': [('Source',
1146
          {'attrib-starts': [('Source',
1115
-                             29),
1116
-                            ('Source.get_streams',
1117
-                             166)],
1118
-          'first-line': 176L,
1147
+                             30),
1148
+                            ('Source.get_content',
1149
+                             41)],
1150
+          'first-line': 79L,
1119
           'folded-linenos': [],
1151
           'folded-linenos': [],
1120
-          'sel-line': 184L,
1121
-          'sel-line-start': 9045L,
1122
-          'selection_end': 9087L,
1123
-          'selection_start': 9074L,
1152
+          'sel-line': 86L,
1153
+          'sel-line-start': 3989L,
1154
+          'selection_end': 4008L,
1155
+          'selection_start': 4005L,
1124
           'zoom': 0L},
1156
           'zoom': 0L},
1125
-         1513039853.364],
1126
-        [loc('resolvers/cloudsany.py'),
1127
-         {'attrib-starts': [('resolve',
1128
-                             30)],
1129
-          'first-line': 81L,
1157
+         1518902242.177],
1158
+        [loc('sources/replay.py'),
1159
+         {'attrib-starts': [('Source',
1160
+                             30),
1161
+                            ('Source.get_content',
1162
+                             41)],
1163
+          'first-line': 79L,
1130
           'folded-linenos': [],
1164
           'folded-linenos': [],
1131
-          'sel-line': 90L,
1132
-          'sel-line-start': 2808L,
1133
-          'selection_end': 2834L,
1134
-          'selection_start': 2834L,
1165
+          'sel-line': 86L,
1166
+          'sel-line-start': 3989L,
1167
+          'selection_end': 4019L,
1168
+          'selection_start': 4016L,
1135
           'zoom': 0L},
1169
           'zoom': 0L},
1136
-         1513039884.569],
1137
-        [loc('sources/cinemalive.py'),
1170
+         1518902242.716],
1171
+        [loc('sources/replay.py'),
1138
          {'attrib-starts': [('Source',
1172
          {'attrib-starts': [('Source',
1139
-                             29),
1140
-                            ('Source.get_streams',
1141
-                             166)],
1142
-          'first-line': 176L,
1173
+                             30),
1174
+                            ('Source.get_content',
1175
+                             41)],
1176
+          'first-line': 79L,
1143
           'folded-linenos': [],
1177
           'folded-linenos': [],
1144
-          'sel-line': 184L,
1145
-          'sel-line-start': 9045L,
1146
-          'selection_end': 9087L,
1147
-          'selection_start': 9074L,
1178
+          'sel-line': 88L,
1179
+          'sel-line-start': 4069L,
1180
+          'selection_end': 4131L,
1181
+          'selection_start': 4128L,
1148
           'zoom': 0L},
1182
           'zoom': 0L},
1149
-         1513039905.096],
1150
-        [loc('resolvers/cloudsany.py'),
1151
-         {'attrib-starts': [('resolve',
1152
-                             30)],
1153
-          'first-line': 81L,
1183
+         1518902243.216],
1184
+        [loc('sources/replay.py'),
1185
+         {'attrib-starts': [('Source',
1186
+                             30),
1187
+                            ('Source.get_content',
1188
+                             41)],
1189
+          'first-line': 89L,
1154
           'folded-linenos': [],
1190
           'folded-linenos': [],
1155
-          'sel-line': 87L,
1156
-          'sel-line-start': 2699L,
1157
-          'selection_end': 2719L,
1158
-          'selection_start': 2719L,
1191
+          'sel-line': 98L,
1192
+          'sel-line-start': 4629L,
1193
+          'selection_end': 4659L,
1194
+          'selection_start': 4659L,
1159
           'zoom': 0L},
1195
           'zoom': 0L},
1160
-         1513041023.607],
1161
-        [loc('sources/euronews.py'),
1196
+         1518902252.631],
1197
+        [loc('sources/replay.py'),
1162
          {'attrib-starts': [('Source',
1198
          {'attrib-starts': [('Source',
1163
-                             26),
1164
-                            ('Source.get_streams',
1165
-                             150)],
1166
-          'first-line': 168L,
1199
+                             30),
1200
+                            ('Source.get_content',
1201
+                             41)],
1202
+          'first-line': 93L,
1167
           'folded-linenos': [],
1203
           'folded-linenos': [],
1168
-          'sel-line': 176L,
1169
-          'sel-line-start': 7974L,
1170
-          'selection_end': 7974L,
1171
-          'selection_start': 7974L,
1204
+          'sel-line': 100L,
1205
+          'sel-line-start': 4691L,
1206
+          'selection_end': 4753L,
1207
+          'selection_start': 4750L,
1172
           'zoom': 0L},
1208
           'zoom': 0L},
1173
-         1513041028.021],
1174
-        [loc('sources/euronews.py'),
1175
-         {'attrib-starts': [],
1176
-          'first-line': 302L,
1209
+         1518902253.454],
1210
+        [loc('sources/replay.py'),
1211
+         {'attrib-starts': [('Source',
1212
+                             30),
1213
+                            ('Source.get_content',
1214
+                             41)],
1215
+          'first-line': 108L,
1177
           'folded-linenos': [],
1216
           'folded-linenos': [],
1178
-          'sel-line': 309L,
1179
-          'sel-line-start': 12837L,
1180
-          'selection_end': 12837L,
1181
-          'selection_start': 12837L,
1217
+          'sel-line': 117L,
1218
+          'sel-line-start': 5571L,
1219
+          'selection_end': 5590L,
1220
+          'selection_start': 5587L,
1182
           'zoom': 0L},
1221
           'zoom': 0L},
1183
-         1516202716.441],
1184
-        [loc('ContentSources.py'),
1185
-         {'attrib-starts': [('ContentSources',
1186
-                             16),
1187
-                            ('ContentSources.get_content',
1188
-                             64)],
1189
-          'first-line': 80L,
1222
+         1518902255.89],
1223
+        [loc('sources/replay.py'),
1224
+         {'attrib-starts': [('Source',
1225
+                             30),
1226
+                            ('Source.get_content',
1227
+                             41)],
1228
+          'first-line': 115L,
1190
           'folded-linenos': [],
1229
           'folded-linenos': [],
1191
-          'sel-line': 89L,
1192
-          'sel-line-start': 4016L,
1193
-          'selection_end': 4016L,
1194
-          'selection_start': 4016L,
1230
+          'sel-line': 122L,
1231
+          'sel-line-start': 5820L,
1232
+          'selection_end': 5882L,
1233
+          'selection_start': 5879L,
1195
           'zoom': 0L},
1234
           'zoom': 0L},
1196
-         1516202720.157],
1197
-        [loc('run.py'),
1198
-         {'attrib-starts': [('Main',
1199
-                             22),
1200
-                            ('Main.play_video',
1201
-                             242)],
1202
-          'first-line': 255L,
1235
+         1518902256.998],
1236
+        [loc('sources/replay.py'),
1237
+         {'attrib-starts': [('Source',
1238
+                             30),
1239
+                            ('Source.get_content',
1240
+                             41)],
1241
+          'first-line': 149L,
1203
           'folded-linenos': [],
1242
           'folded-linenos': [],
1204
-          'sel-line': 264L,
1205
-          'sel-line-start': 10415L,
1206
-          'selection_end': 10415L,
1207
-          'selection_start': 10415L,
1243
+          'sel-line': 158L,
1244
+          'sel-line-start': 7698L,
1245
+          'selection_end': 7717L,
1246
+          'selection_start': 7714L,
1208
           'zoom': 0L},
1247
           'zoom': 0L},
1209
-         1516203350.279],
1210
-        [loc('resolvers/cloudsany.py'),
1211
-         {'attrib-starts': [('resolve',
1212
-                             30)],
1213
-          'first-line': 41L,
1248
+         1518902258.525],
1249
+        [loc('sources/replay.py'),
1250
+         {'attrib-starts': [('Source',
1251
+                             30),
1252
+                            ('Source.get_content',
1253
+                             41)],
1254
+          'first-line': 86L,
1214
           'folded-linenos': [],
1255
           'folded-linenos': [],
1215
-          'sel-line': 55L,
1216
-          'sel-line-start': 1587L,
1217
-          'selection_end': 1599L,
1218
-          'selection_start': 1599L,
1256
+          'sel-line': 93L,
1257
+          'sel-line-start': 4254L,
1258
+          'selection_end': 4254L,
1259
+          'selection_start': 4254L,
1219
           'zoom': 0L},
1260
           'zoom': 0L},
1220
-         1516226196.772]],
1261
+         1518902786.933]],
1221
         20),
1262
         20),
1222
-        'current-loc': loc('ContentSources.py'),
1263
+        'current-loc': loc('sources/ltc.py'),
1223
         'editor-state-list': [(loc('ContentSources.py'),
1264
         'editor-state-list': [(loc('ContentSources.py'),
1224
                                {'attrib-starts': [('ContentSources',
1265
                                {'attrib-starts': [('ContentSources',
1225
         16),
1266
         16),
1226
         ('ContentSources.get_content',
1267
         ('ContentSources.get_content',
1227
          64)],
1268
          64)],
1228
-                                'first-line': 80L,
1269
+                                'first-line': 77L,
1229
                                 'folded-linenos': [],
1270
                                 'folded-linenos': [],
1230
-                                'sel-line': 89L,
1231
-                                'sel-line-start': 4016L,
1232
-                                'selection_end': 4016L,
1233
-                                'selection_start': 4016L,
1271
+                                'sel-line': 80L,
1272
+                                'sel-line-start': 3634L,
1273
+                                'selection_end': 3662L,
1274
+                                'selection_start': 3662L,
1234
                                 'zoom': 0L}),
1275
                                 'zoom': 0L}),
1235
                               (loc('sources/ltc.py'),
1276
                               (loc('sources/ltc.py'),
1236
                                {'attrib-starts': [('Source',
1277
                                {'attrib-starts': [('Source',
1237
         27),
1278
         27),
1238
         ('Source.get_content',
1279
         ('Source.get_content',
1239
          74)],
1280
          74)],
1240
-                                'first-line': 78L,
1281
+                                'first-line': 117L,
1241
                                 'folded-linenos': [],
1282
                                 'folded-linenos': [],
1242
-                                'sel-line': 83L,
1243
-                                'sel-line-start': 3077L,
1244
-                                'selection_end': 3168L,
1245
-                                'selection_start': 3168L,
1283
+                                'sel-line': 122L,
1284
+                                'sel-line-start': 5124L,
1285
+                                'selection_end': 5124L,
1286
+                                'selection_start': 5124L,
1246
                                 'zoom': 0L}),
1287
                                 'zoom': 0L}),
1247
                               (loc('util.py'),
1288
                               (loc('util.py'),
1248
                                {'attrib-starts': [('unescape',
1289
                                {'attrib-starts': [('unescape',
1249
         538)],
1290
         538)],
1250
-                                'first-line': 539L,
1291
+                                'first-line': 537L,
1251
                                 'folded-linenos': [],
1292
                                 'folded-linenos': [],
1252
-                                'sel-line': 547L,
1253
-                                'sel-line-start': 16779L,
1254
-                                'selection_end': 16779L,
1255
-                                'selection_start': 16779L,
1293
+                                'sel-line': 540L,
1294
+                                'sel-line-start': 16550L,
1295
+                                'selection_end': 16598L,
1296
+                                'selection_start': 16598L,
1256
                                 'zoom': 0L}),
1297
                                 'zoom': 0L}),
1257
                               (loc('sources/replay.py'),
1298
                               (loc('sources/replay.py'),
1258
                                {'attrib-starts': [('Source',
1299
                                {'attrib-starts': [('Source',
1259
         30),
1300
         30),
1260
         ('Source.get_content',
1301
         ('Source.get_content',
1261
          41)],
1302
          41)],
1262
-                                'first-line': 236L,
1303
+                                'first-line': 86L,
1263
                                 'folded-linenos': [],
1304
                                 'folded-linenos': [],
1264
-                                'sel-line': 248L,
1265
-                                'sel-line-start': 13008L,
1266
-                                'selection_end': 13008L,
1267
-                                'selection_start': 13008L,
1305
+                                'sel-line': 93L,
1306
+                                'sel-line-start': 4254L,
1307
+                                'selection_end': 4254L,
1308
+                                'selection_start': 4254L,
1268
                                 'zoom': 0L}),
1309
                                 'zoom': 0L}),
1269
                               (loc('sources/cinemalive.py'),
1310
                               (loc('sources/cinemalive.py'),
1270
                                {'attrib-starts': [('Source',
1311
                                {'attrib-starts': [('Source',
1313
         31),
1354
         31),
1314
         ('Source.get_content',
1355
         ('Source.get_content',
1315
          56)],
1356
          56)],
1316
-                                'first-line': 81L,
1357
+                                'first-line': 79L,
1317
                                 'folded-linenos': [],
1358
                                 'folded-linenos': [],
1318
-                                'sel-line': 90L,
1319
-                                'sel-line-start': 3299L,
1320
-                                'selection_end': 3299L,
1321
-                                'selection_start': 3299L,
1359
+                                'sel-line': 88L,
1360
+                                'sel-line-start': 3207L,
1361
+                                'selection_end': 3207L,
1362
+                                'selection_start': 3207L,
1322
                                 'zoom': 0L}),
1363
                                 'zoom': 0L}),
1323
                               (loc('Downloader.py'),
1364
                               (loc('Downloader.py'),
1324
                                {'attrib-starts': [('get_header',
1365
                                {'attrib-starts': [('get_header',
1337
          242)],
1378
          242)],
1338
                                 'first-line': 255L,
1379
                                 'first-line': 255L,
1339
                                 'folded-linenos': [],
1380
                                 'folded-linenos': [],
1340
-                                'sel-line': 264L,
1341
-                                'sel-line-start': 10415L,
1342
-                                'selection_end': 10415L,
1343
-                                'selection_start': 10415L,
1381
+                                'sel-line': 267L,
1382
+                                'sel-line-start': 10485L,
1383
+                                'selection_end': 10511L,
1384
+                                'selection_start': 10511L,
1344
                                 'zoom': 0L}),
1385
                                 'zoom': 0L}),
1345
                               (loc('sources/euronews.py'),
1386
                               (loc('sources/euronews.py'),
1346
                                {'attrib-starts': [],
1387
                                {'attrib-starts': [],
1351
                                 'selection_end': 12837L,
1392
                                 'selection_end': 12837L,
1352
                                 'selection_start': 12837L,
1393
                                 'selection_start': 12837L,
1353
                                 'zoom': 0L}),
1394
                                 'zoom': 0L}),
1354
-                              (loc('sources/filmon.py'),
1355
-                               {'attrib-starts': [('Source',
1356
-        32),
1357
-        ('Source.get_content',
1358
-         47)],
1359
-                                'first-line': 113L,
1360
-                                'folded-linenos': [],
1361
-                                'sel-line': 122L,
1362
-                                'sel-line-start': 4665L,
1363
-                                'selection_end': 4665L,
1364
-                                'selection_start': 4665L,
1365
-                                'zoom': 0L}),
1366
                               (loc('resolver.py'),
1395
                               (loc('resolver.py'),
1367
                                {'attrib-starts': [],
1396
                                {'attrib-starts': [],
1368
                                 'first-line': 0L,
1397
                                 'first-line': 0L,
1396
          loc('Downloader.py'),
1425
          loc('Downloader.py'),
1397
          loc('run.py'),
1426
          loc('run.py'),
1398
          loc('sources/euronews.py'),
1427
          loc('sources/euronews.py'),
1399
-         loc('sources/filmon.py'),
1400
          loc('resolver.py'),
1428
          loc('resolver.py'),
1401
          loc('resolvers/cloudsany.py')]),
1429
          loc('resolvers/cloudsany.py')]),
1402
                                'open_files': [u'Downloader.py',
1430
                                'open_files': [u'Downloader.py',
1403
         u'kivy_test.py',
1431
         u'kivy_test.py',
1404
         u'resolver.py',
1432
         u'resolver.py',
1405
-        u'run.py',
1433
+        u'resolvers/cloudsany.py',
1406
         u'sources/cinemalive.py',
1434
         u'sources/cinemalive.py',
1407
         u'sources/euronews.py',
1435
         u'sources/euronews.py',
1408
         u'sources/filmas.py',
1436
         u'sources/filmas.py',
1409
-        u'sources/filmix.py',
1410
-        u'sources/filmon.py',
1411
         u'sources/lmt.py',
1437
         u'sources/lmt.py',
1412
-        u'sources/ltc.py',
1413
-        u'sources/replay.py',
1438
+        u'sources/filmix.py',
1439
+        u'run.py',
1414
         u'util.py',
1440
         u'util.py',
1415
-        u'resolvers/cloudsany.py',
1416
-        u'ContentSources.py']},
1441
+        u'ContentSources.py',
1442
+        u'sources/replay.py',
1443
+        u'sources/ltc.py']},
1417
         'saved_notebook_display': None,
1444
         'saved_notebook_display': None,
1418
         'split_percents': {0: 0.42670046472327844},
1445
         'split_percents': {0: 0.42670046472327844},
1419
         'splits': 2,
1446
         'splits': 2,
1428
                          -1080,
1455
                          -1080,
1429
                          1858,
1456
                          1858,
1430
                          1080)}]}
1457
                          1080)}]}
1431
-guimgr.recent-documents = [loc('ContentSources.py'),
1432
-                           loc('resolvers/cloudsany.py'),
1458
+guimgr.recent-documents = [loc('sources/ltc.py'),
1459
+                           loc('sources/replay.py'),
1460
+                           loc('ContentSources.py'),
1433
                            loc('util.py'),
1461
                            loc('util.py'),
1434
                            loc('run.py'),
1462
                            loc('run.py'),
1463
+                           loc('sources/filmix.py'),
1464
+                           loc('resolvers/cloudsany.py'),
1435
                            loc('sources/euronews.py'),
1465
                            loc('sources/euronews.py'),
1436
                            loc('sources/cinemalive.py'),
1466
                            loc('sources/cinemalive.py'),
1437
                            loc('resolver.py'),
1467
                            loc('resolver.py'),
1438
-                           loc('sources/filmon.py'),
1439
                            loc('Downloader.py'),
1468
                            loc('Downloader.py'),
1440
                            loc('sources/filmas.py'),
1469
                            loc('sources/filmas.py'),
1441
                            loc('kivy_test.py'),
1470
                            loc('kivy_test.py'),
1442
-                           loc('sources/ltc.py'),
1443
-                           loc('sources/filmix.py'),
1444
-                           loc('sources/lmt.py'),
1445
-                           loc('sources/replay.py')]
1471
+                           loc('sources/lmt.py')]
1446
 guimgr.visual-state = {loc('../../../Python25/Lib/BeautifulSoup.py'): {'attr'\
1472
 guimgr.visual-state = {loc('../../../Python25/Lib/BeautifulSoup.py'): {'attr'\
1447
         'ib-starts': [('NavigableString',
1473
         'ib-starts': [('NavigableString',
1448
                        354),
1474
                        354),
1732
         'zoom': 0L},
1758
         'zoom': 0L},
1733
                        loc('sources/filmon.py'): {'attrib-starts': [('Source',
1759
                        loc('sources/filmon.py'): {'attrib-starts': [('Source',
1734
         32),
1760
         32),
1735
-        ('Source.__init__',
1736
-         34)],
1737
-        'first-line': 26L,
1761
+        ('Source.get_content',
1762
+         47)],
1763
+        'first-line': 113L,
1738
         'folded-linenos': [],
1764
         'folded-linenos': [],
1739
-        'sel-line': 38L,
1740
-        'sel-line-start': 1351L,
1741
-        'selection_end': 1381L,
1742
-        'selection_start': 1381L,
1765
+        'sel-line': 122L,
1766
+        'sel-line-start': 4665L,
1767
+        'selection_end': 4665L,
1768
+        'selection_start': 4665L,
1743
         'zoom': 0L},
1769
         'zoom': 0L},
1744
                        loc('sources/iplayer.py'): {'attrib-starts': [('Sourc'\
1770
                        loc('sources/iplayer.py'): {'attrib-starts': [('Sourc'\
1745
         'e',
1771
         'e',
1959
                         [u''])}
1985
                         [u''])}
1960
 search.replace-history = [u'www.shortcut.lv',
1986
 search.replace-history = [u'www.shortcut.lv',
1961
                           u'shortcut.lv']
1987
                           u'shortcut.lv']
1962
-search.search-history = [u'raise',
1988
+search.search-history = [u'img',
1989
+                         u'desc',
1990
+                         u'unqute',
1991
+                         u'raise',
1963
                          u'can not find ',
1992
                          u'can not find ',
1964
-                         u'img',
1965
                          u'get_head',
1993
                          u'get_head',
1966
                          u'base_url',
1994
                          u'base_url',
1967
                          u'download',
1995
                          u'download',
1976
                          u'host',
2004
                          u'host',
1977
                          u'url_stream',
2005
                          u'url_stream',
1978
                          u'url_sub',
2006
                          u'url_sub',
1979
-                         u'.pack',
1980
-                         u'Text',
1981
-                         u'VideoInfo']
2007
+                         u'.pack']
1982
 testing.stored-results = (1,
2008
 testing.stored-results = (1,
1983
                           [],
2009
                           [],
1984
                           {})
2010
                           {})

+ 5
- 4
sources/filmix.py View File

78
             cookie = r.cookies["FILMIXNET"]
78
             cookie = r.cookies["FILMIXNET"]
79
             url = "https://filmix.me/engine/ajax/sphinx_search.php"
79
             url = "https://filmix.me/engine/ajax/sphinx_search.php"
80
             headers = headers2dict("""
80
             headers = headers2dict("""
81
-User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
82
-X-Requested-With: XMLHttpRequest
81
+User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
83
 Content-Type: application/x-www-form-urlencoded; charset=UTF-8
82
 Content-Type: application/x-www-form-urlencoded; charset=UTF-8
84
-Cookie: FILMIXNET=%s
83
+X-Requested-With: XMLHttpRequest
84
+Cookie: FILMIXNET=%s;
85
 """% cookie)
85
 """% cookie)
86
             #data = "scf=fx&story=%s&search_start=0&do=search&subaction=search" % (plist[1].replace(" ", "+"))
86
             #data = "scf=fx&story=%s&search_start=0&do=search&subaction=search" % (plist[1].replace(" ", "+"))
87
-            data = "sdc=fx&story=%s&do=search&subaction=search"% (plist[1].replace(" ", "+"))
87
+            #data = "sdc=fx&story=%s&do=search&subaction=search"% (plist[1].replace(" ", "+"))
88
+            data = "scf=fx&story=%s&subaction=search" % (plist[1].replace(" ", "+"))
88
             r = requests.post(url, data, headers=headers)
89
             r = requests.post(url, data, headers=headers)
89
             #r = r.content.decode("cp1251").encode("utf8")
90
             #r = r.content.decode("cp1251").encode("utf8")
90
             content = self.process_list(r.content, content)
91
             content = self.process_list(r.content, content)

+ 3
- 2
sources/ltc.py View File

132
                 if item["xprs_id"] in js:
132
                 if item["xprs_id"] in js:
133
                     epg = js[item["xprs_id"]]
133
                     epg = js[item["xprs_id"]]
134
                     desc = "%s - %s (%s-%s)"%(title,epg[0]["t"],epg[0]["hs"],epg[0]["he"])
134
                     desc = "%s - %s (%s-%s)"%(title,epg[0]["t"],epg[0]["hs"],epg[0]["he"])
135
-                    #img = "https://www.shortcut.lv" + epg[0]["p"]
136
-                    img = "https://manstv.shortcut.lv/"+ item['broadcast_default_picture']
135
+                    title = desc
136
+                    img = "https://www.shortcut.lv" + epg[0]["p"]
137
+                    #img = "https://manstv.shortcut.lv/"+ item['broadcast_default_picture']
137
                 else:
138
                 else:
138
                     img = "https://manstv.shortcut.lv/"+ item['broadcast_default_picture']
139
                     img = "https://manstv.shortcut.lv/"+ item['broadcast_default_picture']
139
                     desc = title
140
                     desc = title

+ 9
- 3
sources/replay.py View File

75
         elif clist=="categories":
75
         elif clist=="categories":
76
             url = "http://replay.lsm.lv/lv/raidijumi/?lang=lv&type=video" if lang =="lv" else "http://replay.lsm.lv/ru/peredachi/?lang=ru&type=video"
76
             url = "http://replay.lsm.lv/lv/raidijumi/?lang=lv&type=video" if lang =="lv" else "http://replay.lsm.lv/ru/peredachi/?lang=ru&type=video"
77
             r = self._http_request(url)
77
             r = self._http_request(url)
78
+            icons = {
79
+                #TODO
80
+                "1": "https://www.iconfinder.com/icons/314161/download/png/256",
81
+            }
78
             for item in re.findall(r'<a .+href="(\?lang=\w+&type=video&theme=\d+)">([^<]+)</a>\t', r):
82
             for item in re.findall(r'<a .+href="(\?lang=\w+&type=video&theme=\d+)">([^<]+)</a>\t', r):
79
                 title = item[1]
83
                 title = item[1]
80
                 data2 = url.split("?")[0]+item[0]
84
                 data2 = url.split("?")[0]+item[0]
81
                 data2 = data2.replace(API_URL%lang,"")
85
                 data2 = data2.replace(API_URL%lang,"")
82
-                img = ""
86
+                theme =  item[0].split("theme=")[1]
87
+                img = self.img # TODO icons["1"]
83
                 desc = title
88
                 desc = title
84
                 content.append((title,self.name+"::"+data2,img,desc))
89
                 content.append((title,self.name+"::"+data2,img,desc))
85
             return content
90
             return content
91
             for item in re.findall(r'<a href="/(lv|ru)/kategorija/(\w+)/">.+?<i class="[^"]+"></i>.+?<span>([^<]+)</span>', r, re.DOTALL):
96
             for item in re.findall(r'<a href="/(lv|ru)/kategorija/(\w+)/">.+?<i class="[^"]+"></i>.+?<span>([^<]+)</span>', r, re.DOTALL):
92
                 title = item[2]
97
                 title = item[2]
93
                 data2 = "kategorija/%s/?lang=%s"%(item[1],item[0])
98
                 data2 = "kategorija/%s/?lang=%s"%(item[1],item[0])
94
-                img = ""
99
+                img = self.img
95
                 desc = title
100
                 desc = title
96
                 content.append((title,self.name+"::"+data2,img,desc))
101
                 content.append((title,self.name+"::"+data2,img,desc))
97
             return content
102
             return content
114
                 desc = item[1]
119
                 desc = item[1]
115
                 # 00:10 &ndash; 00:45
120
                 # 00:10 &ndash; 00:45
116
                 desc = desc + " (%s)" % item[2].replace("&ndash;", "-")
121
                 desc = desc + " (%s)" % item[2].replace("&ndash;", "-")
122
+                title = title + " - " + desc
117
                 content.append((title,self.name+"::"+data2,img,desc))
123
                 content.append((title,self.name+"::"+data2,img,desc))
118
             return content
124
             return content
119
 
125
 
167
                 if not m:
173
                 if not m:
168
                     raise Exception("No stream found")
174
                     raise Exception("No stream found")
169
                 data2 = m.group(1).replace("\\","")
175
                 data2 = m.group(1).replace("\\","")
170
-                img = ""
176
+                img = self.img
171
                 desc = ""
177
                 desc = ""
172
 
178
 
173
             desc = title
179
             desc = title

+ 1
- 1
util.py View File

538
 
538
 
539
 def unescape(s0):
539
 def unescape(s0):
540
     #s2 = re.sub("&#\w+;",HTMLParser.HTMLParser().unescape("\1"),s)
540
     #s2 = re.sub("&#\w+;",HTMLParser.HTMLParser().unescape("\1"),s)
541
-    s0 = s0.replace("&amp;","&")
541
+    s0 = s0.replace("&amp;","&").replace("&quot;", '"')
542
     for s in re.findall("&#\w+;",s0):
542
     for s in re.findall("&#\w+;",s0):
543
         s2 = HTMLParser.HTMLParser().unescape(s)
543
         s2 = HTMLParser.HTMLParser().unescape(s)
544
         if isinstance(s0,str):
544
         if isinstance(s0,str):