• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python xbmc.getInfoImage函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中xbmc.getInfoImage函数的典型用法代码示例。如果您正苦于以下问题:Python getInfoImage函数的具体用法?Python getInfoImage怎么用?Python getInfoImage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getInfoImage函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: Playvid

def Playvid(url, name, download=None):
	videopage = utils.getHtml(url, '')
	videourl = re.compile('video_url="([^"]+)"').findall(videopage)[0]
	videourl += re.compile('video_url\+="([^"]+)"').findall(videopage)[0]	
	partes = videourl.split('||')
	videourl = decode_url(partes[0])
	videourl = re.sub('/get_file/\d+/[0-9a-z]{32}/', partes[1], videourl)
	videourl += '&' if '?' in videourl else '?'
	videourl += 'lip=' + partes[2] + '&lt=' + partes[3]		
	if download == 1:
		utils.downloadVideo(videourl, name)
	else:    
		iconimage = xbmc.getInfoImage("ListItem.Thumb")
		listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
		listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
		listitem.setProperty("IsPlayable","true")
		if int(sys.argv[1]) == -1:
			pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
			pl.clear()
			pl.add(videourl, listitem)
			xbmc.Player().play(pl)
		else:
			iconimage = xbmc.getInfoImage("ListItem.Thumb")
			listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
			listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
			xbmc.Player().play(videourl, listitem)
开发者ID:YourFriendCaspian,项目名称:dotfiles,代码行数:26,代码来源:hdzog.py


示例2: playClip

def playClip():
    import xbmc
    title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" )
    thumb = unicode( xbmc.getInfoImage( "ListItem.Thumb" ), "utf-8" )
    #
    listitem = xbmcgui.ListItem( title, '', 'DefaultVideo.png', thumb )
    #
    infoLabels = {
        'title': title,
        'plot': unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" ),
        "episode": int( xbmc.getInfoImage( "ListItem.episode" ) or "-1" ),
        }
    infoLabels.update( b_infoLabels )
    listitem.setInfo( 'video', infoLabels )
    #
    if ADDON.getSetting( "full" ) == "false":
        from resources.lib.scraper import getClip
        srt, hd, sd = getClip( xbmc.getInfoLabel( "ListItem.Property(id)" ) )
    else:
        srt, hd, sd = xbmc.getInfoLabel( "ListItem.Property(srt_url)" ), xbmc.getInfoLabel( "ListItem.Property(hd_url)" ), xbmc.getInfoLabel( "ListItem.Property(sd_url)" )
    #
    media = ( hd, sd )[ int( ADDON.getSetting( "quality" ) ) ]
    #
    xbmc.Player().play( media, listitem )
    #
    print "playClip(%r)" % media
    #
    if ADDON.getSetting( "subtitle" ) == "true":
        from resources.lib.scraper import getSubtitle
        srt = getSubtitle( srt, os.path.splitext( os.path.basename( media ) )[ 0 ] )
        if not xbmc.Player().isPlaying():
            xbmc.sleep( 5000 )
        xbmc.Player().setSubtitles( srt )
        xbmc.Player().showSubtitles( True )
开发者ID:Quihico,项目名称:passion-xbmc,代码行数:34,代码来源:default.py


示例3: __init__

 def __init__(self, nfo_path = None):
     info_labels = {
         'size' : unicode(xbmc.getInfoLabel( "ListItem.Size" ), 'utf-8'),
         'tvshowtitle': unicode(xbmc.getInfoLabel( "ListItem.TvShowTitle" ), 'utf-8'),
         'title': unicode(xbmc.getInfoLabel( "ListItem.Title" ), 'utf-8'),
         'genre': unicode(xbmc.getInfoLabel( "ListItem.Genre" ), 'utf-8'),
         'plot': unicode(xbmc.getInfoLabel( "ListItem.Plot" ), 'utf-8'),
         'aired': unicode(xbmc.getInfoLabel( "ListItem.Premiered" ), 'utf-8'),
         'mpaa': unicode(xbmc.getInfoLabel( "ListItem.MPAA" ), 'utf-8'),
         'duration': unicode(xbmc.getInfoLabel( "ListItem.DUration" ), 'utf-8'),
         'studio': unicode(xbmc.getInfoLabel( "ListItem.Studio" ), 'utf-8'),
         'cast': unicode(xbmc.getInfoLabel( "ListItem.Cast" ), 'utf-8'),
         'writer': unicode(xbmc.getInfoLabel( "ListItem.Writer" ), 'utf-8'),
         'director': unicode(xbmc.getInfoLabel( "ListItem.Director" ), 'utf-8'),
         'season': int(xbmc.getInfoLabel( "ListItem.Season" ) or "-1"),
         'episode': int(xbmc.getInfoLabel( "ListItem.Episode" ) or "-1"),
         'year': int(xbmc.getInfoLabel( "ListItem.Year" ) or "-1"),
         }
     # Clear empty keys
     for key in info_labels.keys():
         if(info_labels[key] == -1):
             del info_labels[key]
         try:
             if (len(info_labels[key])<1):
                 del info_labels[key]
         except:
             pass
     try:
         info_labels['size'] = self._size_to_bytes(info_labels['size'])
     except:
        pass
     try:
         code = self._code_from_plot(info_labels['plot'])
         if code:
             info_labels['code'] = code
     except:
         pass
     try:
         info_labels['cast'] = info_labels['cast'].split('\n')
     except:
         pass
     if not 'title' in info_labels:
         if nfo_path:
             info_labels['title'] = os.path.basename(nfo_path)
         else:
             info_labels['title'] = 'Unknown'
     self.info_labels = info_labels
     self.fanart = unicode(xbmc.getInfoImage( "Listitem.Property(Fanart_Image)" ), 'utf-8')
     self.thumbnail = unicode(xbmc.getInfoImage( "ListItem.Thumb" ), 'utf-8')
     self.nfo_path = nfo_path
开发者ID:TsUPeR,项目名称:xbmc-nzbs,代码行数:50,代码来源:nfo.py


示例4: BGPlayvid

def BGPlayvid(url, name, download=None):
    videopage = utils.getHtml(url, "")
    videopage = json.loads(videopage)

    if not videopage["240p"] == None:
        url = videopage["240p"].encode("utf8")
    if not videopage["480p"] == None:
        url = videopage["480p"].encode("utf8")
    if not videopage["720p"] == None:
        url = videopage["720p"].encode("utf8")

    url = url.replace("{DATA_MARKERS}", "data=pc.DE")
    if not url.startswith("http:"):
        url = "https:" + url

    key = re.compile("/key=(.*?)%2Cend", re.DOTALL | re.IGNORECASE).findall(url)[0]
    decryptedkey = decrypt_key(key)

    videourl = url.replace(key, decryptedkey)

    if download == 1:
        utils.downloadVideo(videourl, name)
    else:
        iconimage = xbmc.getInfoImage("ListItem.Thumb")
        listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
        listitem.setInfo("video", {"Title": name, "Genre": "Porn"})
        listitem.setProperty("IsPlayable", "true")
        if int(sys.argv[1]) == -1:
            pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
            pl.clear()
            pl.add(videourl, listitem)
            xbmc.Player().play(pl)
        else:
            listitem.setPath(str(videourl))
            xbmcplugin.setResolvedUrl(utils.addon_handle, True, listitem)
开发者ID:opesboy,项目名称:WhiteCream-V0.0.1,代码行数:35,代码来源:beeg.py


示例5: __init__

	def __init__( self ) :
		#
		# Constants
		#
		self.VIDEO_PAGE_URL2 = re.compile( ".*/video/(\d+)/.*" )
		self.VIDEO_PAGE_URL3 = re.compile( ".*/video[s]?/.*-(\d+)" )
		
		#
		# Parse parameters...
		#
		params = dict(part.split('=') for part in sys.argv[ 2 ][ 1: ].split('&'))
		
		self.video_page_url = urllib.unquote( params[ "video_page_url" ] )
		self.play_hd        = urllib.unquote( params[ "play_hd" ] ) 

		# Settings
		self.video_players = { "0" : xbmc.PLAYER_CORE_AUTO,
							   "1" : xbmc.PLAYER_CORE_DVDPLAYER,
							   "2" : xbmc.PLAYER_CORE_MPLAYER }
		self.video_player = xbmcplugin.getSetting ("video_player")
		
		#
		# Get current item details...
		#
		self.video_title     = unicode( xbmc.getInfoLabel( "ListItem.Title"  ), "utf-8" )
		self.video_thumbnail =          xbmc.getInfoImage( "ListItem.Thumb"  )
		self.video_studio    = unicode( xbmc.getInfoLabel( "ListItem.Studio" ), "utf-8" )
		self.video_plot      = unicode( xbmc.getInfoLabel( "ListItem.Plot"   ), "utf-8" )
		self.video_genre     = unicode( xbmc.getInfoLabel( "ListItem.Genre"  ), "utf-8" )

		#
		# Play video...
		#
		self.playVideo()
开发者ID:abellujan,项目名称:xbmc4xbox-addons,代码行数:34,代码来源:gamespot_videos_play.py


示例6: _fill_cast

 def _fill_cast( self, listitem ):
     xbmcgui.lock()
     try:
         # clear the cast list
         self.getControl( self.CONTROL_INFO_CAST ).reset()
         # grab the cast from the main lists listitem, we use this for actor thumbs
         cast = xbmc.getInfoLabel( "Container(100).ListItem.Cast" )
         # if cast exists we fill the cast list
         if ( cast ):
             # we set these class variables for the player
             self.title = xbmc.getInfoLabel( "Container(100).ListItem.Title" )
             self.genre = xbmc.getInfoLabel( "Container(100).ListItem.Genre" )
             self.plot = xbmc.getInfoLabel( "Container(100).ListItem.Plot" )
             self.director = xbmc.getInfoLabel( "Container(100).ListItem.Director" )
             self.year = int( xbmc.getInfoLabel( "Container(100).ListItem.Year" ) )
             self.trailer = xbmc.getInfoLabel( "Container(100).ListItem.Trailer" )
             self.thumb = xbmc.getInfoImage( "Container(100).ListItem.Thumb" )
             # we actually use the ListItem.CastAndRole infolabel to fill the list
             role = xbmc.getInfoLabel( "Container(100).ListItem.CastAndRole" ).split( "\n" )
             # enumerate through our cast list and set cast and role
             for count, actor in enumerate( cast.split( "\n" ) ):
                 # create the actor cached thumb
                 actor_path = xbmc.translatePath( os.path.join( "P:\\Thumbnails", "Video", xbmc.getCacheThumbName( "actor" + actor )[ 0 ], xbmc.getCacheThumbName( "actor" + actor ) ) )
                 # if an actor thumb exists use it, else use the default thumb
                 actor_thumbnail = ( "DefaultActorBig.png", actor_path, )[ os.path.isfile( actor_path ) ]
                 # set the default icon
                 actor_icon = "DefaultActorBig.png"
                 # add the item to our cast list
                 self.getControl( self.CONTROL_INFO_CAST ).addItem( xbmcgui.ListItem( role[ count ], iconImage=actor_icon, thumbnailImage=actor_thumbnail ) )
             # set the play trailer buttons status
             self._set_trailer_button( self.trailer )
     except:
         pass
     xbmcgui.unlock()
开发者ID:drrlramsey,项目名称:xbmc-addons,代码行数:34,代码来源:default.py


示例7: Playvid

def Playvid(url, name, download=None):
    listhtml = utils.getHtml2(url)
    listhtml = utils.unescapes(listhtml)
    match480 = re.search(r'[[]480p[]]=([^"]*?)&video_vars', listhtml)
    if match480: videourl = match480.group(1)
    else:
     match360 = re.search(r'[[]360p[]]=([^"]*?)&video_vars', listhtml)
     videourl = match360.group(1)
     
    if download == 1:
        utils.downloadVideo(videourl, name)
    else:
        iconimage = xbmc.getInfoImage("ListItem.Thumb")
        listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
        listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
        listitem.setProperty("IsPlayable","true")
        if int(sys.argv[1]) == -1:
            pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
            pl.clear()
            pl.add(videourl, listitem)
            xbmc.Player().play(pl)
        else:
            listitem.setPath(str(videourl))
            xbmcplugin.setResolvedUrl(utils.addon_handle, True, listitem)
        return
开发者ID:Kasik,项目名称:Kasiks-Repo,代码行数:25,代码来源:playvids.py


示例8: PlayMovie

def PlayMovie(name, url):
    if 'm3u8' in url:
       PlayStream(name, url)
    else:
       progress.create('Play video', 'Searching videofile')
       progress.update( 30, "", "Loading video page", "Sending it to urlresolver" )
       source = urlresolver.HostedMediaFile(url)
       if source:
          progress.update( 80, "", "Loading video page", "Found the video" )
          streamurl = source.resolve()
          if source.resolve()==False:
             progress.close()
             xbmc.executebuiltin("XBMC.Notification(Oh no!,Link Cannot Be Resolved,5000)")          
             return
       else:
             streamurl = url
       progress.close()
       iconimage = xbmc.getInfoImage("ListItem.Thumb")
       ok = True
       listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
       listitem.setInfo(type="Video", infoLabels={ "Title": name })
       ok = xbmcplugin.addDirectoryItem(addon_handle,url=streamurl,listitem=listitem)
       try:
          xbmc.Player().play(streamurl, listitem, False)
          return ok
       except: pass
开发者ID:azumimuo,项目名称:family-xbmc-addon,代码行数:26,代码来源:utils.py


示例9: LOAD_AND_PLAY_VIDEO

 def LOAD_AND_PLAY_VIDEO(self, url, title, player=True):
     if url == "":
         d = xbmcgui.Dialog()
         d.ok("Nie znaleziono streamingu", "Może to chwilowa awaria.", "Spróbuj ponownie za jakiś czas")
         return False
     thumbnail = xbmc.getInfoImage("ListItem.Thumb")
     liz = xbmcgui.ListItem(title, iconImage="DefaultVideo.png", thumbnailImage=thumbnail)
     liz.setInfo(type="Video", infoLabels={"Title": title})
     try:
         if player != True:
             print "custom player pCommon"
             xbmcPlayer = player
         else:
             print "default player pCommon"
             xbmcPlayer = xbmc.Player()
         xbmcPlayer.play(url, liz)
     except:
         d = xbmcgui.Dialog()
         d.ok(
             "Błąd przy przetwarzaniu, lub wyczerpany limit czasowy oglądania.",
             "Zarejestruj się i opłać abonament.",
             "Aby oglądać za darmo spróbuj ponownie za jakiś czas",
         )
         return False
     return True
开发者ID:mrknow,项目名称:filmkodi,代码行数:25,代码来源:mrknow_pCommon.py


示例10: __LOAD_AND_PLAY

 def __LOAD_AND_PLAY(self, url, title, player=True, pType='video'):
     if url == '':
         d = xbmcgui.Dialog()
         d.ok('Nie znaleziono streamingu', 'Może to chwilowa awaria.', 'Spróbuj ponownie za jakiś czas')
         return False
     thumbnail = xbmc.getInfoImage("ListItem.Thumb")
     liz = xbmcgui.ListItem(title, iconImage="DefaultVideo.png", thumbnailImage=thumbnail)
     liz.setInfo(type="pType", infoLabels={"Title": title})
     try:
         if player != True:
             print "custom player pCommon"
             xbmcPlayer = player
         else:
             print "default player pCommon"
             xbmcPlayer = xbmc.Player()
         xbmcPlayer.play(url, liz)
     except:
         d = self.dialog()
         if pType == "video":
             d.ok('Wystąpił błąd!', 'Błąd przy przetwarzaniu, lub wyczerpany limit czasowy oglądania.',
                  'Zarejestruj się i opłać abonament.', 'Aby oglądać za darmo spróbuj ponownie za jakiś czas.')
         elif pType == "music":
             d.ok('Wystąpił błąd!', 'Błąd przy przetwarzaniu.', 'Aby wysłuchać spróbuj ponownie za jakiś czas.')
         return False
     return True
开发者ID:anopid,项目名称:filmkodi,代码行数:25,代码来源:tvnplayer.py


示例11: PlaySEBN

def PlaySEBN(url,name=None):
    iconimage = xbmc.getInfoImage("ListItem.Thumb")
    liz=xbmcgui.ListItem(name, iconImage="DefaultFolder.png", thumbnailImage=iconimage)
    liz.setInfo( type="Video", infoLabels={ "Title": name } )
    dp = xbmcgui.DialogProgress()
    dp.create("DutchSportStreams","Please wait")  
    xbmc.Player().play(url, liz, False)
开发者ID:EPiC-APOC,项目名称:repository.xvbmc,代码行数:7,代码来源:default.py


示例12: play

 def play(self):
   if Debug: self.LOG('Play Video')
   # Get current list item details...
   title = unicode(xbmc.getInfoLabel("ListItem.Title"), "utf-8")
   thumbnail = xbmc.getInfoImage("ListItem.Thumb")
   plot = unicode(xbmc.getInfoLabel("ListItem.Plot"), "utf-8")
   director = unicode(xbmc.getInfoLabel("ListItem.Director"), "utf-8")
   date = unicode(xbmc.getInfoLabel("ListItem.Date"), "utf-8")
   year = unicode(xbmc.getInfoLabel("ListItem.Year"), "utf-8")
   studio = unicode(xbmc.getInfoLabel("ListItem.Studio"), "utf-8")
   # Parse HTML results page...
   html = urllib.urlopen(self.Arguments('url')).read()
   # Get FLV video...
   match = re.compile('so.addVariable\(\'file\'\,\'(.+?)\'\)\;').findall(html)
   for _url in match:
     video_url = _url
   # Create video playlist...
   playlist = xbmc.PlayList(1)
   playlist.clear()
   # only need to add label, icon and thumbnail, setInfo() and addSortMethod() takes care of label2
   listitem = xbmcgui.ListItem(title, iconImage="DefaultVideo.png", thumbnailImage=thumbnail)
   # set the key information
   listitem.setInfo("Video", {"Title": title,
                              "Label" : title,
                              "Director" : director,
                              "Plot": plot,
                              "PlotOutline": plot,
                              "Date" : date,
                              #"Year" : year,
                              "Studio" : studio })
   # add item to our playlist
   playlist.add(video_url, listitem)
   # Play video...
   xbmcPlayer = xbmc.Player()
   xbmcPlayer.play(playlist)
开发者ID:queeup,项目名称:plugin.video.videocopilot,代码行数:35,代码来源:addon.py


示例13: BGPlayvid

def BGPlayvid(url, name, download=None):
    videopage = utils.getHtml(url, '')
    match = re.compile("'720p': '([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)
    if not match:
        match = re.compile("'480p': '([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)
    if not match:
        match = re.compile("'240p': '([^']+)'", re.DOTALL | re.IGNORECASE).findall(videopage)
    if match:    
        videourl = match[0]
        if download == 1:
            utils.downloadVideo(videourl, name)
        else:
            iconimage = xbmc.getInfoImage("ListItem.Thumb")
            listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
            listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
            listitem.setProperty("IsPlayable","true")
            if int(sys.argv[1]) == -1:
                pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
                pl.clear()
                pl.add(videourl, listitem)
                xbmc.Player().play(pl)
                #xbmc.Player().play(videourl, listitem)
            else:
                listitem.setPath(str(videourl))
                xbmcplugin.setResolvedUrl(utils.addon_handle, True, listitem)
开发者ID:jake47,项目名称:WhiteCream-V0.0.1.bundle,代码行数:25,代码来源:beeg.py


示例14: playVideo

    def playVideo( self, video ) :
        #
        # Get current list item details...
        #
        title     = unicode( xbmc.getInfoLabel( "ListItem.Title"   ), "utf-8" )
        thumbnail =          xbmc.getInfoImage( "ListItem.Thumb"   )
        studio    = unicode( xbmc.getInfoLabel( "ListItem.Studio"  ), "utf-8" )
        plot      = unicode( xbmc.getInfoLabel( "ListItem.Plot"    ), "utf-8" )
        director  = unicode( xbmc.getInfoLabel( "ListItem.Director"), "utf-8" )       

        #    
        # Play video...
        #
        playlist = xbmc.PlayList( xbmc.PLAYLIST_VIDEO )
        playlist.clear()
 
        listitem = xbmcgui.ListItem( title, iconImage="DefaultVideo.png", thumbnailImage=thumbnail )
        listitem.setInfo( "video", { "Title": title, "Studio" : studio, "Plot" : plot, "Director" : director } )
        playlist.add( video, listitem )
        
        # Play video...
        xbmcPlayer = xbmc.Player( self.video_players[ self.video_player ] )
        xbmcPlayer.play(playlist)   

#
# The End
#
开发者ID:abellujan,项目名称:xbmc4xbox-addons,代码行数:27,代码来源:microsoft_pdc_play.py


示例15: play

  def play(self, page, mode=''):
    if Debug: self.LOG('DEBUG: _play()\nurl: %s' % page)
    # Get current list item details...
    title = unicode(xbmc.getInfoLabel("ListItem.Title"), "utf-8")
    thumbnail = xbmc.getInfoImage("ListItem.Thumb")
    plot = unicode(xbmc.getInfoLabel("ListItem.Plot"), "utf-8")

    if mode == 'smil':
      smil = BSS(self._get(page))
      rtmp = smil.meta['base']
      video = smil.video['src']
      swfUrl = 'http://medici.tv/medici.swf'
      # rtmpdump script for console use 
      rtmpdump = "rtmpdump -r %s --swfUrl http://medici.tv/medici.swf --tcUrl '%s' --playpath '%s' -o '%s.mp4'" % \
                  (rtmp, rtmp, saxutils.unescape(video), saxutils.unescape(title))
      # Build rtmp url...
      video_url = rtmp + ' swfUrl=' + swfUrl + ' tcUrl=' + rtmp + ' playpath=' + saxutils.unescape(video)
      if Debug: self.LOG('DEBUG: rtmp link details.\n\trtmp: %s\n\tswfUrl: %s\n\ttcUrl: %s\n\tplaypath: %s\n\trtmpdump: %s' % \
                         (rtmp, swfUrl, rtmp, saxutils.unescape(video), rtmpdump))
    elif mode == 'rtmp_daily':
      video_url = page.split('&rtmp=1')[0]
      if Debug: self.LOG('DEBUG: video link details.\n\turl: %s' % video_url)
    else:
      video_url = ''
      if Debug: self.LOG('DEBUG: no video link!')
      raise
    # only need to add label, icon and thumbnail, setInfo() and addSortMethod() takes care of label2
    listitem = xbmcgui.ListItem(title, iconImage="DefaultVideo.png", thumbnailImage=thumbnail)
    # set listitem information
    listitem.setInfo('video', {'title': title,
                               'label' : title,
                               'plot': plot,
                               'plotoutline': plot, })
    # Play video...
    xbmc.Player().play(video_url , listitem)
开发者ID:lluisnaval,项目名称:plugin.video.medici.tv,代码行数:35,代码来源:addon.py


示例16: Playvid

def Playvid(username, name):
    try:
       postRequest = {'method' : 'getRoomData', 'args[]' : 'false', 'args[]' : str(username)}
       response = utils.postHtml('http://bongacams.com/tools/amf.php', form_data=postRequest,headers={'X-Requested-With' : 'XMLHttpRequest'},compression=False)
    except:
        utils.notify('Oh oh','Couldn\'t find a playable webcam link')
        return None

    amf_json = json.loads(response)

    if amf_json['localData']['videoServerUrl'].startswith("//mobile"):
       videourl = 'https:' + amf_json['localData']['videoServerUrl'] + '/hls/stream_' + username + '.m3u8'  
    else:
       videourl = 'https:' + amf_json['localData']['videoServerUrl'] + '/hls/stream_' + username + '/playlist.m3u8'

    iconimage = xbmc.getInfoImage("ListItem.Thumb")
    listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
    listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
    listitem.setProperty("IsPlayable","true")
    if int(sys.argv[1]) == -1:
        pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
        pl.clear()
        pl.add(videourl, listitem)
        xbmc.Player().play(pl)
    else:
        listitem.setPath(str(videourl))
        xbmcplugin.setResolvedUrl(utils.addon_handle, True, listitem)
开发者ID:YourFriendCaspian,项目名称:dotfiles,代码行数:27,代码来源:bongacams.py


示例17: getVideo

def getVideo(name,url,cat,plot):
	req=urllib2.Request(url)
	req.add_header('User-Agent', HEADER)
	response=urllib2.urlopen(req)
	data=response.read()
	response.close()
	video=re.compile('<video>(.+?)</video>').findall(data)
	req=urllib2.Request('http://video.nationalgeographic.com/video/cgi-bin/cdn-auth/cdn_tokenized_url.pl?slug='+video[0]+'&siteid=ngcchannelvideos')
	req.add_header('User-Agent', HEADER)
	response=urllib2.urlopen(req)
	data=response.read()
	response.close()
	tokenizedURL=re.compile('<tokenizedURL>(.+?)</tokenizedURL>').findall(data)
	req=urllib2.Request(tokenizedURL[0].replace('&amp;','&'))
	req.add_header('User-Agent', HEADER)
	response=urllib2.urlopen(req)
	data=response.read()
	response.close()
	serverName=re.compile('<serverName>(.+?)</serverName>').findall(data)
	appName=re.compile('<appName><!\[CDATA\[(.+?)\]\]></appName>').findall(data)
	streamName=re.compile('<streamName><!\[CDATA\[(.+?)\]\]></streamName>').findall(data)
	g_thumbnail = xbmc.getInfoImage( "ListItem.Thumb" )
	listitem=xbmcgui.ListItem(name ,iconImage="DefaultVideo.png", thumbnailImage=g_thumbnail)
	listitem.setInfo( type="Video", infoLabels={ "Title": name, "Director": 'National Geographic', "Studio": 'National Geographic', "Genre": cat, "Plot": plot } )
	listitem.setProperty("PlayPath", streamName[0])
	xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play('rtmp://'+serverName[0]+'/'+appName[0], listitem)
开发者ID:drrlramsey,项目名称:xbmc-addons,代码行数:26,代码来源:default.py


示例18: BGPlayvid

def BGPlayvid(url, name, download=None):
    videopage = utils.getHtml2(url)
    videopage = json.loads(videopage)
    
    if not videopage["240p"] == None:
        url = videopage["240p"].encode("utf8")
    if not videopage["480p"] == None:
        url = videopage["480p"].encode("utf8")
    if not videopage["720p"] == None:
        url = videopage["720p"].encode("utf8")

    url = url.replace("{DATA_MARKERS}","data=pc.XX")
    if not url.startswith("http:"): url = "http:" + url
    videourl = url

    if download == 1:
        utils.downloadVideo(videourl, name)
    else:
        iconimage = xbmc.getInfoImage("ListItem.Thumb")
        listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", thumbnailImage=iconimage)
        listitem.setInfo('video', {'Title': name, 'Genre': 'Porn'})
        listitem.setProperty("IsPlayable","true")
        if int(sys.argv[1]) == -1:
            pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
            pl.clear()
            pl.add(videourl, listitem)
            xbmc.Player().play(pl)
        else:
            listitem.setPath(str(videourl))
            xbmcplugin.setResolvedUrl(utils.addon_handle, True, listitem)
开发者ID:neopack1,项目名称:WhiteCream-V0.0.1,代码行数:30,代码来源:beeg.py


示例19: PlayLiveLink

def PlayLiveLink(url, name):
    urlDic = getLiveUrl(url)

    if not urlDic == None:
        line1 = "Url found, Preparing to play"
        time = 2000
        xbmc.executebuiltin("Notification(%s, %s, %d, %s)" % (__addonname__, line1, time, __icon__))

        rtmp = urlDic["rtmp"]
        playPath = urlDic["playpath"]
        swf = urlDic["swf"]

        playfile = "%s playpath=%s swfUrl=%s token=%s live=1 timeout=15 swfVfy=1 pageUrl=%s" % (
            rtmp,
            playPath,
            swf,
            "%bwwpe([email protected]#.",
            url,
        )
        listitem = xbmcgui.ListItem(
            label=str(name), iconImage="DefaultVideo.png", thumbnailImage=xbmc.getInfoImage("ListItem.Thumb")
        )
        print "playing stream name: " + str(name)
        xbmc.Player(xbmc.PLAYER_CORE_AUTO).play(playfile, listitem)
    else:
        line1 = "Stream not found"
        time = 2000
        xbmc.executebuiltin("Notification(%s, %s, %d, %s)" % (__addonname__, line1, time, __icon__))

    return
开发者ID:khalidclinic,项目名称:ShaniXBMCWork,代码行数:30,代码来源:default.py


示例20: playRtmp

def playRtmp(params,url,category):
    logger.info("[sonolatino.py] playRtmp")

    title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" )
    
    try:
        thumbnail = urllib.unquote_plus( params.get("thumbnail") )
    except:
        thumbnail = xbmc.getInfoImage( "ListItem.Thumb" )
    plot = urllib.unquote_plus( params.get("plot") )
    plot = urllib.unquote_plus( params.get("plot") )

    try:
        plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" )
    except:
        plot = xbmc.getInfoLabel( "ListItem.Plot" )

    server = params["server"]
    logger.info("[sonolatino.py] thumbnail="+thumbnail)
    logger.info("[sonolatino.py] server="+server    )
    
    
    

    item=xbmcgui.ListItem(title, iconImage='', thumbnailImage=thumbnail, path=url)
    item.setInfo( type="Video",infoLabels={ "Title": title})
    xbmcplugin.setResolvedUrl(pluginhandle, True, item)
开发者ID:Bycacha,项目名称:BYCACHA,代码行数:27,代码来源:sonolatino.py



注:本文中的xbmc.getInfoImage函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python xbmc.getInfoLabel函数代码示例发布时间:2022-05-26
下一篇:
Python xbmc.getGlobalIdleTime函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap