Erhman / seppius-xbmc-repo

Automatically exported from code.google.com/p/seppius-xbmc-repo
0 stars 1 forks source link

megogo.net - качество картинки #61

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Переключение качества картинки не 
работает.

Переделал так, чтоб работало:

def play(params):

    qu= __addon__.getSetting('qual_v')
    bitrate=['240','320','360','480','576','720','1080']
    if qu>0: params['bitrate']=bitrate[int(qu)-1]
    data = GET('info', params)

    bandwidth=['200000','450000','900000','1350000','1500000','2000000','5000000']
    targetbandwidth=bandwidth[int(qu)-1]
    remotefile = urllib2.urlopen(data['src'])
    playlist = remotefile.readlines()
    remotefile.close()
    blength=len(targetbandwidth)+1
    for num in range(2,len(playlist)-1):
        if playlist[num][-blength:-1]==targetbandwidth:
        data['src']=playlist[num+1]
        break

    i = xbmcgui.ListItem( path = data['src'] )
    xbmcplugin.setResolvedUrl(hos, True, i)

Original issue reported on code.google.com by dmi...@vinogradov.net on 10 May 2013 at 7:29

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Были проблемы на сервере, переключение 
может не работать из-за проблем с апи

Original comment by nuism...@gmail.com on 21 Jan 2014 at 11:24