mathsgrinds / IETVNOW

Plays 12 live Irish TV stations (RTE1, RTE2, TV3, TG4, 3e, be3, RTEjr, RTE1 +1, RTE NEWS NOW, Oireachtas TV, Dail, Seanad)
Apache License 2.0
6 stars 3 forks source link

TV Guide Support Fix #16

Closed rlaphoenix closed 7 years ago

rlaphoenix commented 7 years ago
def router(paramstring):
    params = dict(parse_qsl(paramstring[1:]))
    if params:
        if params['mode'] == 'play':
            play_item = xbmcgui.ListItem(path=params['link'])
            xbmcplugin.setResolvedUrl(__handle__, True, listitem=play_item)
        if params['mode'] == '0':
            for stream in streams():
                if params['channel'] in stream['thumb']:
                    play_item = xbmcgui.ListItem(path=str(stream['link']))
                    xbmcplugin.setResolvedUrl(__handle__, True, listitem=play_item)
    else:
        for stream in streams():
            list_item = xbmcgui.ListItem(label=stream['name'], thumbnailImage=stream['thumb'])
            list_item.setProperty('fanart_image', stream['thumb'])
            list_item.setProperty('IsPlayable', 'true')
            url = '{0}?mode=play&link={1}'.format(__url__, stream['link'])
            xbmcplugin.addDirectoryItem(__handle__, url, list_item, isFolder=False)
        xbmcplugin.endOfDirectory(__handle__)

It changes params so that it can read index 1-2 and in the if stream['name'] == params['channel']: bit used to just say "channel" but thats fixed.

EDIT: Tested it and it wasnt working, Modified the code even more. Tested on 3e. The reason its checking the &channel= param against the thumb rather than the name is because it takes too long for it to load and in most cases makes it look like its a slow link or not working at all so if we bash it against the thumb with in it works perfectly and instantly.

rlaphoenix commented 7 years ago

Oh PS!, The Auto Scraper for 3e doesnt work - The link it grabs just doesnt work, Im assuming its missing a ?get token after .m3u8 which wasnt grabbed from the regex maybe? But either way stick with the permanent one, I found out the reason it shows 1-2 of the same ads at the same point when you load it is just due to a ad system they use (Its seperate from the actual stations one).

Link if you need it: http://csm-e.cds1.yospace.com/csm/extlive/tv3ie01,3e-prd.m3u8

rlaphoenix commented 7 years ago

Could you add me as a Collaberator in Repo Settings so I could just make these type of edits myself and fast? Its easier then making a bunch of pull requests and/or pointless issue threads.

rlaphoenix commented 7 years ago

Found a new Perma Link for TG4 - http://tg4-lh.akamaihd.net/EirBeo1_1200_tg4@118693?videoId=2538842141001&lineUpId;=&pubId=1290862567001&playerId=1364138050001&lineUpId;=&pubId=1290862567001&playerId=1364138050001&affiliateId;=&bandwidthEstimationTest=false&v=3.3.0&fp=WIN 13,0,0,2&r=MWDOQ&g=TPANMNTKXCBN (You will need to url-encode it to fix the spaces and such)

The video is like 16:10 or something and is very wide - But you can set kodi to stretch videos to 16:9/Full Screen to fix that so its all good :D

P.S This link seems to be the direct feed from Sky etc, The reason I say that is because it doesnt seem to use Yopspace's Ad System where each time you load the stream it plays an ad before playing the actual stream, This one doesnt.

rlaphoenix commented 7 years ago

Oh - I cant try going past the ads because of Data Limits until Tomorow, But you should implement the changes I made for TG4 and the TV Guide Fix

mathsgrinds commented 7 years ago

Hi, so I updated the code. Now, that perma link, is it really permanent? Because the perma link for tg4 changed at least once in the last month.

rlaphoenix commented 7 years ago

Make sure you update the repo too, And yes its permanent - I found it on a really old website. P.S Your repo must not be setup right cause the icon or fanart.jpg isnt loading anything and it looks weird when installing stuff

rlaphoenix commented 7 years ago

Get rid of the perm link - It is a permanent link but the amount of shows restricted as it think we arent in ireland is bloody insane almost every single time I load it up it blocks the stream because of this - So hop back to the old way