kodi-czsk / script.module.stream.resolver

3 stars 25 forks source link

Add myvi.ru resolver #35

Closed jose1711 closed 8 years ago

jose1711 commented 8 years ago

This change is Reviewable

lubo commented 8 years ago

Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion.


a discussion (no related file): All right, the logic here seems to be really flowed, but before any further discussion, could you run your code through a solid beautifier for once, please ? I can't read this shit !


Comments from Reviewable

jose1711 commented 8 years ago

Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion.


a discussion (no related file):

Previously, Kuci (Ľubomír Kučera) wrote… > All right, the logic here seems to be really flowed, but before any further discussion, could you run your code through a solid beautifier for once, please ? I can't read this shit ! >

Ran it through PythonTidy, if a specific formatter is required, please advise.


Comments from Reviewable

lubo commented 8 years ago

Review status: 0 of 1 files reviewed at latest revision, 4 unresolved discussions.


a discussion (no related file):

Previously, jose1711 (Jose Riha) wrote… > Ran it through PythonTidy, if a specific formatter is required, please advise. >

Great. We want to follow PEP 8 but besides that, nothing special.


lib/server/myviruresolver.py, line 31 [r2] (raw file):

__name__ = 'myviru'

UA = 'Mozilla/6.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.5) Gecko/2008092417 Firefox/3.0.3'

Why not to use UA from util ?


lib/server/myviruresolver.py, line 48 [r2] (raw file):

    for f in playlist['video']:
        streamurl = f['url']
        streamurl += '|Cookie=' + urllib.quote('UniversalUserID='

Why do you always use urllib.quote() on UniversalUserID= ? Hard coding UniversalUserID%3D instead would improve the performance a bit.


_lib/server/myviruresolver.py, line 50 [r2] (raw file):_

        streamurl += '|Cookie=' + urllib.quote('UniversalUserID='
            + uuid.value)
        streamurl += '&User-Agent=' + urllib.quote(UA)

The same thing, but quoting the UA outside the loop would be more appropriate.


Comments from Reviewable

jose1711 commented 8 years ago

Review status: 0 of 1 files reviewed at latest revision, 4 unresolved discussions.


a discussion (no related file):

Previously, Kuci (Ľubomír Kučera) wrote… > Great. We want to follow PEP 8 but besides that, nothing special. >

ok, will use autopep8 from now on, other suggestions implemented as well


Comments from Reviewable

lubo commented 8 years ago

Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion.


a discussion (no related file):

Previously, jose1711 (Jose Riha) wrote… > ok, will use autopep8 from now on, other suggestions implemented as well >

But there's one exception you might want to know about. When it comes to line lengths, we use maximum of 100 characters.

LGTM, merging now.


Comments from Reviewable

lubo commented 8 years ago

Reviewed 1 of 1 files at r3. Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable