예제 #1
0
파일: cozucu.py 프로젝트: noba3/KoTos
def yeni4(name,url):
        xbmcPlayer = xbmc.Player() 
        playList = xbmc.PlayList(xbmc.PLAYLIST_VIDEO) 
        playList.clear() 
        araclar.addLink(name,url,'')
        listitem = xbmcgui.ListItem(name) 
        playList.add(url, listitem) 
        xbmcPlayer.play(playList)
예제 #2
0
def yeni4(name, url):
    xbmcPlayer = xbmc.Player()
    playList = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
    playList.clear()
    araclar.addLink(name, url, '')
    listitem = xbmcgui.ListItem(name)
    playList.add(url, listitem)
    xbmcPlayer.play(playList)
예제 #3
0
파일: default.py 프로젝트: noba3/KoTos
def Youtube_Player2(url):
        playList.clear()   
        code=re.match(r"http://www.youtube.com/embed/(.*?)$", url).group(1)
        print '[code]'+str(code)
        url='plugin://plugin.video.youtube/?action=play_video&videoid=' + code
        name='MagicTR Reklam'
        araclar.addLink(name,url,'')
        araclar.playlist_yap(playList,name,url)
        xbmcPlayer.play(playList)
예제 #4
0
def Youtube_Player(url):
    playList.clear()
    code = re.match(r"http://www.youtube.com/embed/(.*?)$", url).group(1)
    print '[code]' + str(code)
    url = 'plugin://plugin.video.youtube/play/?video_id=' + code
    name = 'MagicTR Reklam'
    araclar.addLink(name, url, '')
    araclar.playlist_yap(playList, name, url)
    xbmcPlayer.play(playList)
예제 #5
0
파일: ddizi.py 프로젝트: kadztr/ddizi
def play(sonuc):
        xbmcPlayer = xbmc.Player()
        playList = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
        if xbmcPlayer.isPlaying():
                xbmcPlayer.stop()
        playList.clear()
        print "***************",sonuc
        for x in sonuc:
                name=x[0]
                url=x[1]
                if "youtube" in str(url):
                        code=url.replace("http://www.youtube.com/watch?v=","")
                        url='plugin://plugin.video.youtube/?action=play_video&videoid=' + str(code)
                playList.add(url)
                araclar.addLink(name,url,"")
                
        if playList:
               xbmcPlayer.play(playList)
예제 #6
0
def magix_player(name, url):

    if "mail.ru" in url:
        MailRu_Player(url)
    if "ok.ru" in url:
        ok_ru(url)

    else:

        UrlResolverPlayer = url
        playList.clear()
        media = urlresolver.HostedMediaFile(UrlResolverPlayer)
        source = media
        if source:
            url = source.resolve()
            araclar.addLink(name, url, '')
            araclar.playlist_yap(playList, name, url)
            xbmcPlayer.play(playList)
예제 #7
0
파일: cozucu.py 프로젝트: noba3/KoTos
def magix_player(name,url):
    

        if "mail.ru" in url:
            MailRu_Player(url)
        if "ok.ru" in url:
            ok_ru(url)

                
        else:
            
                          
            
            UrlResolverPlayer = url
            playList.clear()
            media = urlresolver.HostedMediaFile(UrlResolverPlayer)
            source = media
            if source:
                    url = source.resolve()
                    araclar.addLink(name,url,'')
                    araclar.playlist_yap(playList,name,url)
                    xbmcPlayer.play(playList)
예제 #8
0
def MailRu_Player(url):
    req = urllib2.Request(url)

    resp = urllib2.urlopen(req)
    html = resp.read()
    cookie_string = resp.headers.getheader('Set-Cookie').split(';')[0]

    print resp.headers.getheader('Set-Cookie')
    headers = {'Cookie': cookie_string}

    metadata_url_start = html.find('metadataUrl') + len('metadataUrl":"')
    metadata_url_end = html.find('"', metadata_url_start)
    metadata_url = html[metadata_url_start:metadata_url_end]

    metadata_response = urllib2.urlopen(metadata_url)
    metadata = json.loads(metadata_response.read())

    #---------------------------------#
    xbmc_cookies = '|Cookie=' + urllib.quote(cookie_string)
    streams = [(v['key'], v['url'] + xbmc_cookies) for v in metadata['videos']]
    for name, url in streams:
        araclar.addLink('[COLOR lightblue][B]M_R >>  [/B][/COLOR]' + name, url,
                        '')
예제 #9
0
파일: cozucu.py 프로젝트: noba3/KoTos
def MailRu_Player(url):
    req = urllib2.Request(url)

    resp = urllib2.urlopen(req)
    html = resp.read()
    cookie_string = resp.headers.getheader('Set-Cookie').split(';')[0]

    print resp.headers.getheader('Set-Cookie')
    headers = {
        'Cookie': cookie_string
    }

    metadata_url_start = html.find('metadataUrl') + len('metadataUrl":"')
    metadata_url_end = html.find('"', metadata_url_start)
    metadata_url = html[metadata_url_start:metadata_url_end]

    metadata_response =  urllib2.urlopen(metadata_url)
    metadata = json.loads(metadata_response.read()) 

    #---------------------------------#
    xbmc_cookies = '|Cookie=' + urllib.quote(cookie_string)
    streams = [(v['key'], v['url'] + xbmc_cookies) for v in metadata['videos']]
    for name,url in streams:
            araclar.addLink('[COLOR lightblue][B]M_R >>  [/B][/COLOR]'+name,url,'')