Преглед изворни кода

pa jaunam salabots replay nfo

Ivars пре 5 година
родитељ
комит
8020099d52
2 измењених фајлова са 64 додато и 30 уклоњено
  1. 55
    29
      project.wpr
  2. 9
    1
      sources/replay.py

+ 55
- 29
project.wpr Прегледај датотеку

@@ -159,10 +159,14 @@ debug.breakpoints = {loc('Downloader.py'): {94: (0,
159 159
                None,
160 160
                1,
161 161
                0)},
162
-                     loc('sources/replay.py'): {145L: (0,
162
+                     loc('sources/replay.py'): {13L: (0,
163 163
         None,
164 164
         1,
165 165
         0),
166
+        145L: (0,
167
+               None,
168
+               1,
169
+               0),
166 170
         366L: (0,
167 171
                None,
168 172
                1,
@@ -307,7 +311,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
307 311
                                {'tree-state': {'file-sort-method': 'by name',
308 312
         'list-files-first': 0,
309 313
         'tree-states': {'deep': {'expanded-nodes': [],
310
-                                 'selected-nodes': [(13,)],
314
+                                 'selected-nodes': [],
311 315
                                  'top-node': (0,)}},
312 316
         'tree-style': 'deep'}}),
313 317
                               ('snippets',
@@ -826,18 +830,18 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
826 830
         'top-node': [('generic attribute',
827 831
                       loc('../../../../../Python27/lib/site-packages/PIL/Image.py'),
828 832
                       'ADAPTIVE')]},
829
-        loc('unknown:<untitled> #3'): {'column-widths': [1.0],
833
+        loc('unknown:<untitled> #4'): {'column-widths': [1.0],
830 834
                                        'expanded-nodes': [],
831 835
                                        'selected-nodes': [],
832 836
                                        'top-node': None},
833
-        loc('unknown:<untitled> #6'): {'column-widths': [1.0],
837
+        loc('unknown:<untitled> #3'): {'column-widths': [1.0],
834 838
                                        'expanded-nodes': [],
835 839
                                        'selected-nodes': [],
836 840
                                        'top-node': None},
837 841
         loc('unknown:<untitled> #5'): {'expanded-nodes': [],
838 842
                                        'selected-nodes': [],
839 843
                                        'top-node': None},
840
-        loc('unknown:<untitled> #4'): {'expanded-nodes': [],
844
+        loc('unknown:<untitled> #6'): {'expanded-nodes': [],
841 845
                                        'selected-nodes': [],
842 846
                                        'top-node': None}},
843 847
                                 'browse_mode': u'Current Module',
@@ -974,20 +978,14 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
974 978
         -1,
975 979
         -1),
976 980
                        'attrib-starts': [],
977
-                       'first-line': 21L,
981
+                       'first-line': 0L,
978 982
                        'folded-linenos': [],
979
-                       'history': {u'file:C:/Data/Programming/Kodi/plugin.video.playstream/resources/lib/content/sources/replay.py': ['p'\
980
-        'rint url2\n',
981
-        'print headers\n',
982
-        'raise \n',
983
-        'url3\n',
984
-        'url\n',
985
-        'data2\n']},
983
+                       'history': {},
986 984
                        'launch-id': None,
987
-                       'sel-line': 29L,
988
-                       'sel-line-start': 2068L,
989
-                       'selection_end': 2068L,
990
-                       'selection_start': 2068L,
985
+                       'sel-line': 0L,
986
+                       'sel-line-start': 0L,
987
+                       'selection_end': 0L,
988
+                       'selection_start': 0L,
991 989
                        'zoom': 0L}),
992 990
                      ('debug-watch',
993 991
                       'wide',
@@ -1535,20 +1533,17 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1535 1533
                                 'selection_start': 48949L,
1536 1534
                                 'zoom': 0L}),
1537 1535
                               (loc('sources/replay.py'),
1538
-                               {'attrib-starts': [('Source',
1539
-        31),
1540
-        ('Source.get_streams',
1541
-         220)],
1542
-                                'first-line': 360L,
1536
+                               {'attrib-starts': [],
1537
+                                'first-line': 4L,
1543 1538
                                 'folded-linenos': [70L,
1544 1539
         89L,
1545 1540
         143L,
1546 1541
         166L,
1547 1542
         284L],
1548
-                                'sel-line': 386L,
1549
-                                'sel-line-start': 19370L,
1550
-                                'selection_end': 19405L,
1551
-                                'selection_start': 19405L,
1543
+                                'sel-line': 12L,
1544
+                                'sel-line-start': 356L,
1545
+                                'selection_end': 356L,
1546
+                                'selection_start': 356L,
1552 1547
                                 'zoom': 0L}),
1553 1548
                               (loc('sources/lmt.py'),
1554 1549
                                {'attrib-starts': [('Source',
@@ -1628,7 +1623,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1628 1623
                                 'selection_end': 4774L,
1629 1624
                                 'selection_start': 4774L,
1630 1625
                                 'zoom': 0L})],
1631
-        'has-focus': True,
1626
+        'has-focus': False,
1632 1627
         'locked': False},
1633 1628
         [loc('run.py'),
1634 1629
          loc('util.py'),
@@ -1643,6 +1638,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1643 1638
          loc('sources/SourceBase.py')]),
1644 1639
                                'open_files': [u'changelog.md',
1645 1640
         u'run.py',
1641
+        u'sources/SourceBase.py',
1646 1642
         u'sources/config.py',
1647 1643
         u'sources/euronews.py',
1648 1644
         u'sources/filmas.py',
@@ -1650,7 +1646,6 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1650 1646
         u'sources/lmt.py',
1651 1647
         u'sources/ltc.py',
1652 1648
         u'util.py',
1653
-        u'sources/SourceBase.py',
1654 1649
         u'sources/replay.py']},
1655 1650
         'saved_notebook_display': None,
1656 1651
         'split_percents': {0: 0.47474747474747475},
@@ -1667,8 +1662,8 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1667 1662
                          2455,
1668 1663
                          1462)}]}
1669 1664
 guimgr.recent-documents = [loc('sources/replay.py'),
1670
-                           loc('sources/SourceBase.py'),
1671 1665
                            loc('util.py'),
1666
+                           loc('sources/SourceBase.py'),
1672 1667
                            loc('sources/ltc.py'),
1673 1668
                            loc('sources/filmix.py'),
1674 1669
                            loc('sources/filmas.py'),
@@ -2251,6 +2246,37 @@ proj.build-cmd = {None: ('default',
2251 2246
                          None)}
2252 2247
 proj.env-vars = {None: ('default',
2253 2248
                         [u''])}
2249
+proj.matplotlib-event-loop = False
2250
+proj.template-debugging = False
2251
+proj.vcs-system-config = ('prefs',
2252
+                          {'bzr': {'versioncontrol.bzr.active': 'active-if-p'\
2253
+        'roject-dir',
2254
+                                   'versioncontrol.bzr.executable': u'bzr'},
2255
+                           'cvs': {'versioncontrol.cvs.active': 'active-if-p'\
2256
+        'roject-dir',
2257
+                                   'versioncontrol.cvs.executable': u'cvs',
2258
+                                   'versioncontrol.cvs.extra-global-args': '-'\
2259
+        'z3'},
2260
+                           'git': {'versioncontrol.git.active': 'active-if-p'\
2261
+        'roject-dir',
2262
+                                   'versioncontrol.git.executable': u'git',
2263
+                                   'versioncontrol.git.use-porcelain': True},
2264
+                           'hg': {'versioncontrol.hg.active': 'active-if-pro'\
2265
+        'ject-dir',
2266
+                                  'versioncontrol.hg.dont-find-unregistered': True,
2267
+                                  'versioncontrol.hg.executable': u'hg',
2268
+                                  'versioncontrol.hg.extra-global-args': '--'\
2269
+        'encoding=utf8'},
2270
+                           'perforce': {'versioncontrol.perforce.active': 'n'\
2271
+        'ot-active',
2272
+        'versioncontrol.perforce.dont-find-unregistered': True,
2273
+        'versioncontrol.perforce.executable': u'p4',
2274
+        'versioncontrol.perforce.extra-global-args': ''},
2275
+                           'svn': {'versioncontrol.svn.active': 'active-if-p'\
2276
+        'roject-dir',
2277
+                                   'versioncontrol.svn.executable': u'svn',
2278
+                                   'versioncontrol.svn.extra-global-args': '',
2279
+                                   'versioncontrol.svn.svnadmin-executable': u'svnadmin'}})
2254 2280
 search.replace-history = [u'filmix.co',
2255 2281
                           u'https://replay.lsm.lv',
2256 2282
                           u'www.shortcut.lv',

+ 9
- 1
sources/replay.py Прегледај датотеку

@@ -333,6 +333,14 @@ class Source(SourceBase):
333 333
             desc.append(plot)
334 334
             desc = "\n".join(desc)
335 335
 
336
+            nfo["title"] = title
337
+            nfo["thumb"] = img
338
+            #nfo["runtime"] = None
339
+            #nfo["quality"] = None
340
+            nfo["plot"] = desc
341
+            nfo["tagline"] = plot
342
+
343
+
336 344
             headers = headers2dict("""
337 345
 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36
338 346
 Referer: https://replay.lsm.lv/%s/%s
@@ -403,7 +411,7 @@ Referer: https://replay.lsm.lv/%s/%s
403 411
             stream["desc"] = desc
404 412
             stream["resolver"] = "replay"
405 413
             stream["headers"] = headers
406
-            stream["nfo"] = nfo
414
+            stream["nfo"] = {"movie":nfo}
407 415
             stream["quality"] = resolution
408 416
             stream["order"] = bitrate
409 417
             #stream["filename"] = filename # TODO jāģenere jēdzigs faila nosaukums, kuru pēc tam izmanto downloads