Example #1
0
def tvPlay(url, title, show_title):
    if title:
        li = xbmcgui.ListItem(label=show_title + ' ' + title)
        xbmc.Player().play(url, li)
    else:
        xbmc.Player().play(url)
    return
Example #2
0
def watch_live_hd():
    rtmpurl = 'rtmp://aljazeeraflashlivefs.fplive.net:1935/aljazeeraflashlive-live/aljazeera_eng_high live=true'
    li = xbmcgui.ListItem('AlJazeera HD Live')
    xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play(rtmpurl, li)
    # Return an empty list so we can test with plugin.crawl() and
    # plugin.interactive()
    return []
def playVideoStream(tv_username, tv_password, issue_id, tvstation_name,
                    stream_duration):
    log('Start playVideoStream')
    # get a neterra class
    Neterra = neterra(tv_username, tv_password)
    html = Neterra.openContentStream(Neterra.CONTENTURL + Neterra.GETSTREAM,
                                     'issue_id=' + issue_id)
    jsonResponse = json.loads(html)
    log('playVideoStream json response: ' + str(jsonResponse))
    # parse html for flashplayer link
    tcUrl = jsonResponse['play_link']
    playpath = jsonResponse['file_link']
    isLive = jsonResponse['live']
    if "dvr" in tcUrl:
        # apapt tcUrl for DVR streams
        tcUrl = tcUrl.replace('/dvr', '/live')
        tcUrl = tcUrl.replace('DVR&', '')
        tcUrl = tcUrl.replace(':443', ':80')
    # log some details
    log('playpath: ' + playpath)
    log('tcUrl: ' + tcUrl)
    playUrl = tcUrl + ' ' + neterra.SWFPLAYERURL + ' playpath=' + playpath + ' ' + neterra.SWFPAGEURL + ' ' + neterra.SWfVfy + ' live=' + isLive + ' ' + neterra.SWFBUFFERDEFAULT
    listitem = xbmcgui.ListItem(label=str(tvstation_name))
    if stream_duration:
        log("Stream duration: " + str(stream_duration))
        listitem.setInfo('video', {
            'title': tvstation_name,
            'duration': stream_duration
        })
    xbmc.Player().play(playUrl, listitem)
    log('URL: ' + playUrl)
    log('Finished playVideoStream')
    html = ''
    return html
def playIssueStream(tv_username, tv_password, url):
    log('Start playIssueStream')
    #get a neterra class
    Neterra = neterra(tv_username, tv_password)
    html = Neterra.getIssueStream(url)
    log(html)
    #parse html for flashplayer link
    startpoint = html.find('rtmp')
    endpoint = html.find('file_link') - 3
    #remove / from string
    rtmp = html[startpoint:endpoint]
    rtmp = rtmp.replace('\\', '')
    startpoint = rtmp.find('/vod')
    endpoint = len(rtmp)
    app = rtmp[startpoint + 1:endpoint]
    startpoint = html.find('file_link') + len('file_link') + 3
    endpoint = html.find(',', startpoint) - 1
    playpath = html[startpoint:endpoint]
    playpath = playpath.replace('\\', '')
    tcUrl = rtmp
    #log some details
    log('playpath: ' + playpath)
    log('rtmp: ' + rtmp)
    log('app: ' + app)
    log('tcUrl: ' + tcUrl)
    #ensure app name is given as there rtmplib has problems to parse information from rtmp string
    #url=rtmp+' app='+app+' tcUrl='+tcUrl+' '+neterra.SWFPLAYERURL+' playpath='+playpath+' '+neterra.SWFPAGEURL+' '+neterra.SWfVfy+' live=0 ' + neterra.SWFBUFFERDEFAULT+' token='+neterra.TOKEN
    url = rtmp + ' app=' + app + ' tcUrl=' + tcUrl + ' ' + neterra.SWFPLAYERURL + ' playpath=' + playpath + ' ' + neterra.SWFPAGEURL + ' live=0 ' + neterra.SWFBUFFERDEFAULT + ' token=' + neterra.TOKEN
    #call player
    xbmc.Player().play(url)
    log('URL: ' + url)
    log('Finished playIssueStream')
    html = ''
    return html
def playLiveStream(tv_username, tv_password, url):
    log('Start playLiveStream')
    #get a neterra class
    Neterra = neterra(tv_username, tv_password)
    html = Neterra.getTVStream(url)
    log(html)
    #parse html for flashplayer link
    startpoint = html.find('rtmp')
    endpoint = html.find('file_link') - 3
    #remove crap from string
    rtmp = html[startpoint:endpoint]
    rtmp = rtmp.replace('\\', '')
    startpoint = rtmp.find('/rtplive')
    endpoint = len(rtmp)
    app = rtmp[startpoint + 1:endpoint]
    startpoint = html.find('file_link') + len('file_link') + 3
    endpoint = html.find(',', startpoint) - 1
    playpath = html[startpoint:endpoint]
    tcUrl = rtmp
    #log some details
    log('playpath: ' + playpath)
    log('rtmp: ' + rtmp)
    log('app: ' + app)
    log('tcUrl: ' + tcUrl)
    url = rtmp + ' tcUrl=' + tcUrl + ' ' + neterra.SWFPLAYERURL + ' playpath=' + playpath + ' ' + neterra.SWFPAGEURL + ' ' + neterra.SWfVfy + ' live=1 ' + neterra.SWFBUFFERDEFAULT + ' token=' + neterra.TOKEN
    url = rtmp + ' tcUrl=' + tcUrl + ' ' + neterra.SWFPLAYERURL + ' playpath=' + playpath + ' ' + neterra.SWFPAGEURL + ' live=1 ' + neterra.SWFBUFFERDEFAULT + ' token=' + neterra.TOKEN
    #call player
    xbmc.Player().play(url)
    log('URL: ' + url)
    log('Finished playLiveStream')
    html = ''
    return html
Example #6
0
def watch_live():
    rtmpurl = 'rtmp://aljazeeraflashlivefs.fplive.net:443/aljazeeraflashlive-live?videoId=883816736001&lineUpId=&pubId=665003303001&playerId=751182905001&affiliateId=/aljazeera_eng_med?videoId=883816736001&lineUpId=&pubId=665003303001&playerId=751182905001&affiliateId= live=true'
    li = xbmcgui.ListItem('AlJazeera Live')
    xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play(rtmpurl, li)
    # Return an empty list so we can test with plugin.crawl() and
    # plugin.interactive()
    return []
def play_live(url, title, thumb, chid, usern, passwd):

    if usern != '':
        auth_resp = auth.doAuth(usern, passwd)
        if auth_resp < 100:
            xbmcgui.Dialog().ok(
                "Autorizacija nije uspješna",
                "Niste unijeli korisničke podatke ili uneseni podaci nisu tačni.\n\nNakon što kliknete OK otvoriće Vam se postavke te je neophodno da unesete ispravno korisničko ime i lozinku za Moja webTV servis "
            )
            xbmcaddon.Addon(id='plugin.video.mojawebtv').openSettings()
        if auth_resp > 99:
            li = xbmcgui.ListItem(label=title, thumbnailImage=thumb)
            li.setInfo(type='Video', infoLabels={"Title": title})
            li.setProperty('IsPlayable', 'true')
            xbmc.Player(xbmc.PLAYER_CORE_AUTO).play(url, li)

    if usern == '':
        li = xbmcgui.ListItem(label=title, thumbnailImage=thumb)
        li.setInfo(type='Video', infoLabels={"Title": title})
        li.setProperty('IsPlayable', 'true')
        xbmc.Player(xbmc.PLAYER_CORE_AUTO).play(url, li)
        # Return an empty list so we can test with plugin.crawl() and
        # plugin.interactive()
        return []
def berlin():
    url = 'http://alex-stream.rosebud-media.de:1935/live/alexlivetv.smil/playlist.m3u8'
    li = xbmcgui.ListItem('Berlin')
    xbmc.Player(xbmc.PLAYER_CORE_AUTO).play(url, li)
    return []
def dessau():
    url = 'http://62.113.210.250/medienasa-live/_definst_/mp4:ok-dessau_high/playlist.m3u8'
    li = xbmcgui.ListItem('Dessau')
    xbmc.Player(xbmc.PLAYER_CORE_AUTO).play(url, li)
    return []
def trier():
    url = 'mms://streaming.ok54.de/ok54'
    li = xbmcgui.ListItem('Trier')
    xbmc.Player(xbmc.PLAYER_CORE_AUTO).play(url, li)
    return []
def wernigerode():
    url = 'http://62.113.210.250/medienasa-live/_definst_/mp4:ok-wernigerode_high/playlist.m3u8'
    li = xbmcgui.ListItem('Wernigerode')
    xbmc.Player(xbmc.PLAYER_CORE_AUTO).play(url, li)
    return []
def speyer():
    url = 'http://s2.fairprice-streams.de:9420/;stream.nsv'
    li = xbmcgui.ListItem('Speyer')
    xbmc.Player(xbmc.PLAYER_CORE_AUTO).play(url, li)
    return []
def salzwedel():
    url = 'http://62.113.210.250/medienasa-live/_definst_/mp4:ok-salzwedel_high/playlist.m3u8'
    li = xbmcgui.ListItem('Salzwedel')
    xbmc.Player(xbmc.PLAYER_CORE_AUTO).play(url, li)
    return []
def pirmasens():
    url = 'mms://streaming.ok54.de/suedwestpfalz-tv'
    li = xbmcgui.ListItem('Pirmasens, Rodalben & Zweibrücken')
    xbmc.Player(xbmc.PLAYER_CORE_AUTO).play(url, li)
    return []
def merseburg():
    url = 'http://62.113.210.250/medienasa-live/_definst_/mp4:ok-merseburg_high/playlist.m3u8'
    li = xbmcgui.ListItem('Merseburg')
    xbmc.Player(xbmc.PLAYER_CORE_AUTO).play(url, li)
    return []
def landau():
    url = 'mms://streaming.ok54.de/okweinstrasse'
    li = xbmcgui.ListItem('Landau, Neustadt & Haßloch')
    xbmc.Player(xbmc.PLAYER_CORE_AUTO).play(url, li)
    return []