joolswills / plugin.video.iplayer

This plugin is broken.
10 stars 4 forks source link

Failure to handle all bitrates in live_tv.py #123

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I set quality to 800 in the settings, I get this error:

File "/home/media/.xbmc/addons/plugin.video.iplayer/lib/live_tv.py", line 43, 
in fetch_stream_info

if   quality == 1: quality_attr = 'pc_stream_audio_video_simulcast_uk_v_lm_p004'

UnboundLocalError: local variable 'quality' referenced before assignment

Turns out req_bitrate was actually equal to 820 here, hence not handled:

    if   req_bitrate <= 480: quality = 1
    elif req_bitrate == 800: quality = 2
    elif req_bitrate >= 1500: quality = 3

Original issue reported on code.google.com by matthew....@gmail.com on 17 Jul 2013 at 9:39

GoogleCodeExporter commented 9 years ago
Thanks. Yep looks like they changed stuff around. Unfortunately the live_tv.py 
code is very dumb. I did a partial integration of that into the main code, so 
the bitrate selection is better. Unfortunately it's been a lack of time to 
finalise that (I have a lot of other unpaid work ;-)).

Ill try to get a quick fix in when I can.

Original comment by exob...@gmail.com on 17 Jul 2013 at 10:54

GoogleCodeExporter commented 9 years ago
live tv code has now been merged into the main code, so it is more intelligent 
when choosing streams/bitrates etc.

Original comment by exob...@gmail.com on 3 Jan 2014 at 4:29