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

Python xbmc.getInfoLabel函数代码示例

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

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



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

示例1: main

def main():
    path = xbmc.getInfoLabel('ListItem.Path')    
    db_type = xbmc.getInfoLabel('ListItem.DBTYPE')
    if db_type == "tvshow":
        path = urllib.quote_plus(path)
        url = "plugin://{0}/tv/set_library_player/{1}".format(pluginid, path)
        xbmc.executebuiltin("RunPlugin({0})".format(url))
开发者ID:podgod,项目名称:podgod,代码行数:7,代码来源:context_tvshow.py


示例2: get_folderandprefix

 def get_folderandprefix(self):
     '''get the current folder and prefix'''
     cur_folder = ""
     cont_prefix = ""
     try:
         widget_container = self.win.getProperty("SkinHelper.WidgetContainer").decode('utf-8')
         if xbmc.getCondVisibility("Window.IsActive(movieinformation)"):
             cont_prefix = ""
             cur_folder = xbmc.getInfoLabel(
                 "movieinfo-$INFO[Container.FolderPath]"
                 "$INFO[Container.NumItems]"
                 "$INFO[Container.Content]").decode('utf-8')
         elif widget_container:
             cont_prefix = "Container(%s)." % widget_container
             cur_folder = xbmc.getInfoLabel(
                 "widget-%s-$INFO[Container(%s).NumItems]-$INFO[Container(%s).ListItemAbsolute(1).Label]" %
                 (widget_container, widget_container, widget_container)).decode('utf-8')
         else:
             cont_prefix = ""
             cur_folder = xbmc.getInfoLabel(
                 "$INFO[Container.FolderPath]$INFO[Container.NumItems]$INFO[Container.Content]").decode(
                 'utf-8')
     except Exception as exc:
         log_exception(__name__, exc)
         cur_folder = ""
         cont_prefix = ""
     return (cur_folder, cont_prefix)
开发者ID:marcelveldt,项目名称:script.skin.helper.service,代码行数:27,代码来源:listitem_monitor.py


示例3: myPlayerChanged

    def myPlayerChanged( self, event, force_update=False ):
        LOG( LOG_DEBUG, "%s (rev: %s) GUI::myPlayerChanged [%s]", __scriptname__, __svn_revision__, [ "stopped","ended","started" ][ event ] )
        if ( event < 2 ): 
            self.exit_script()
        else:
            for cnt in range( 5 ):
                song = xbmc.getInfoLabel( "MusicPlayer.Title" )
                #print "Song" + song

                artist = xbmc.getInfoLabel( "MusicPlayer.Artist" )
                #print "Artist" + artist                
                if ( song and ( not artist or self.settings[ "use_filename" ] ) ):
                    artist, song = self.get_artist_from_filename( xbmc.Player().getPlayingFile() )
                if ( song and ( self.song != song or self.artist != artist or force_update ) ):
                    self.artist = artist
                    self.song = song
                    self.lock.acquire()
                    try:
                        self.timer.cancel()
                    except:
                        pass
                    self.lock.release()
                    self.get_lyrics( artist, song )
                    break
                xbmc.sleep( 50 )
            if (self.allowtimer and self.settings[ "smooth_scrolling" ] and self.getControl( 110 ).size() > 1):
                self.lock.acquire()
                try:
                    self.timer.cancel()
                except:
                    pass
                self.lock.release()
                self.refresh()
开发者ID:EddyPan,项目名称:xbmc-addons-chinese-1,代码行数:33,代码来源:gui.py


示例4: __init__

 def __init__(self):
     self.log("__init__")
     # InfoLabel Parameters  
     self.Label       = xbmc.getInfoLabel('ListItem.Label')
     self.Path        = xbmc.getInfoLabel('ListItem.FolderPath')
     self.FileName    = xbmc.getInfoLabel('ListItem.FilenameAndPath')
     self.DBIDType    = xbmc.getInfoLabel('ListItem.DBTYPE')
     self.AddonName   = xbmc.getInfoLabel('Container.PluginName')
     self.AddonType   = xbmc.getInfoLabel('Container.Property(addoncategory)')
     self.Description = xbmc.getInfoLabel('ListItem.Property(Addon.Description)')
     self.plot        = xbmc.getInfoLabel('ListItem.Plot')
     self.plotOutline = xbmc.getInfoLabel('ListItem.PlotOutline')
     self.isPlayable  = xbmc.getInfoLabel('ListItem.Property(IsPlayable)').lower() == 'true'
     self.isFolder    = xbmc.getCondVisibility('ListItem.IsFolder') == 1
     
     if not self.plot:
         if self.plotOutline:
             self.Description = self.plotOutline
         elif not self.Description:   
             self.Description = self.Label
     else:  
         self.Description = self.plot
       
     if self.AddonName:
         ADDON = xbmcaddon.Addon(id=self.AddonName)
         ADDON_ID = ADDON.getAddonInfo('id')
         self.AddonName = ADDON.getAddonInfo('name')
         
     self.chnlst = ChannelList()
     self.Label = self.chnlst.cleanLabels(self.Label)
     self.Description  = self.chnlst.cleanLabels(self.Description)
     self.AddonName = self.chnlst.cleanLabels(self.AddonName)
     self.log("%s, %s, %s, %s, %s, %s, %s, %s, %s"%(self.Label,self.Path,self.FileName,self.DBIDType,self.AddonName,self.AddonType,self.Description,str(self.isPlayable),str(self.isFolder)))
     self.ImportChannel()
开发者ID:mrioan,项目名称:XBMC_Addons,代码行数:34,代码来源:capture.py


示例5: detail

def detail(params, url, category):
    logger.info("[documentalesatonline.py] detail")

    title = unicode(xbmc.getInfoLabel("ListItem.Title"), "utf-8")
    thumbnail = urllib.unquote_plus(params.get("thumbnail"))
    plot = unicode(xbmc.getInfoLabel("ListItem.Plot"), "utf-8")

    # Descarga la página
    data = scrapertools.cachePage(url)
    # logger.info(data)

    # ------------------------------------------------------------------------------------
    # Busca los enlaces a los videos
    # ------------------------------------------------------------------------------------
    listavideos = servertools.findvideos(data)

    for video in listavideos:
        xbmctools.addvideo(CHANNELNAME, "Megavideo - " + video[0], video[1], category, video[2])
        # ------------------------------------------------------------------------------------

        # Label (top-right)...
    xbmcplugin.setPluginCategory(handle=pluginhandle, category=category)

    # Disable sorting...
    xbmcplugin.addSortMethod(handle=pluginhandle, sortMethod=xbmcplugin.SORT_METHOD_NONE)

    # End of directory...
    xbmcplugin.endOfDirectory(handle=pluginhandle, succeeded=True)
开发者ID:jorik041,项目名称:pelisalacarta-personal-fork,代码行数:28,代码来源:documentalesatonline.py


示例6: CreateDialogYesNo

def CreateDialogYesNo(header="", line1="", nolabel="", yeslabel="", noaction="", yesaction=""):
    if yeslabel == "":
        yeslabel = xbmc.getInfoLabel("Window.Property(Dialog.yes.Label)")
        if yeslabel == "":
            yeslabel = "yes"
    if nolabel == "":
        nolabel = xbmc.getInfoLabel("Window.Property(Dialog.no.Label)")
        if nolabel == "":
            nolabel = "no"
    if yesaction == "":
        yesaction = xbmc.getInfoLabel("Window.Property(Dialog.yes.Builtin)")
    if noaction == "":
        noaction = xbmc.getInfoLabel("Window.Property(Dialog.no.Builtin)")
    dialog = xbmcgui.Dialog()
    ret = dialog.yesno(heading=header, line1=line1, nolabel=nolabel, yeslabel=yeslabel)  # autoclose missing
    if ret:
        for builtin in yesaction.split("||"):
            xbmc.executebuiltin(builtin)
            xbmc.sleep(30)
    else:
        for builtin in noaction.split("||"):
            xbmc.executebuiltin(builtin)
            xbmc.sleep(30)
    xbmc.executebuiltin("ClearProperty(Dialog.yes.Label")
    xbmc.executebuiltin("ClearProperty(Dialog.no.Label")
    xbmc.executebuiltin("ClearProperty(Dialog.yes.Builtin")
    xbmc.executebuiltin("ClearProperty(Dialog.no.Builtin")
    return ret
开发者ID:braz96,项目名称:script.toolbox,代码行数:28,代码来源:Utils.py


示例7: onPlayBackStopped

  def onPlayBackStopped(self):
	log('player stops')
	type = 'unkown'
	if (self.isPlayingAudio()):
	  type = "music"
	else:
		if xbmc.getCondVisibility('VideoPlayer.Content(movies)'):
			filename = ''
			isMovie = True
		try:
			filename = self.getPlayingFile()
		except:
			pass
		if filename != '':
			for string in self.substrings:
				if string in filename:
					isMovie = False
					break
		if isMovie:
			type = "movie"
		elif xbmc.getCondVisibility('VideoPlayer.Content(episodes)'):
	  # Check for tv show title and season to make sure it's really an episode
			if xbmc.getInfoLabel('VideoPlayer.Season') != "" and xbmc.getInfoLabel('VideoPlayer.TVShowTitle') != "":
				type = "episode"
	typevar=type
	
	if typevar!="music":
		global script_playerV_stops
		log('Going to execute script = "' + script_playerV_stops + '"')
		xbmc.executebuiltin('XBMC.RunScript('+script_playerV_stops+ ", " + self.playing_type()+')')
	if typevar=="music":
		global script_playerA_stops
		log('Going to execute script = "' + script_playerA_stops + '"')
		xbmc.executebuiltin('XBMC.RunScript('+script_playerA_stops+ ", " + self.playing_type()+')')
开发者ID:Homidom,项目名称:HoMIDoM-Plugin-XBMC-KODI,代码行数:34,代码来源:default.py


示例8: getControls

    def getControls( self ):
        coordinates = self.getControl( 2000 ).getPosition()

        c_anim = []
        try:
            import re
            for anim in re.findall( "(\[.*?\])", xbmc.getInfoLabel( "Control.GetLabel(1999)" ), re.S ):
                try: c_anim.append( tuple( eval( anim ) ) )
                except: pass
        except:
            print_exc()

        self.controls[ "background" ] = Control( self.getControl( 2001 ), coordinates, c_anim )

        self.controls[ "heading" ] = Control( self.getControl( 2002 ), coordinates, c_anim )

        self.controls[ "label" ] = Control( self.getControl( 2003 ), coordinates, c_anim )

        try:
            v = xbmc.getInfoLabel( "Control.GetLabel(2045)" ).replace( ", ", "," )
            progressTextures = dict( [ k.split( "=" ) for k in v.split( "," ) ] )
        except:
            progressTextures = {}

        self.controls[ "progress1" ] = Control( self.getControl( 2004 ), coordinates, c_anim, **progressTextures )

        self.controls[ "progress2" ] = Control( self.getControl( 2005 ), coordinates, c_anim, **progressTextures )

        self.controls[ "button" ] = Control( self.getControl( 2006 ), coordinates, c_anim )
开发者ID:cClaude,项目名称:plugin.image.mypicsdb,代码行数:29,代码来源:AddonScan.py


示例9: onPlayBackStarted

 def onPlayBackStarted(self):
     xbmc.sleep(1000)
     # Set values based on the file content
     if (self.isPlayingAudio()):
         self.type = "music"
     else:
         if xbmc.getCondVisibility('VideoPlayer.Content(movies)'):
             filename = ''
             isMovie = True
             try:
                 filename = self.getPlayingFile()
             except:
                 pass
             if filename != '':
                 for string in self.substrings:
                     if string in filename:
                         isMovie = False
                         break
             if isMovie:
                 self.type = "movie"
         elif xbmc.getCondVisibility('VideoPlayer.Content(episodes)'):
             # Check for tv show title and season
             # to make sure it's really an episode
             if xbmc.getInfoLabel('VideoPlayer.Season') != "" and xbmc.getInfoLabel('VideoPlayer.TVShowTitle') != "":
                 self.type = "episode"
         elif xbmc.getCondVisibility('VideoPlayer.Content(musicvideos)'):
             self.type = "musicvideo"
开发者ID:hitmixer,项目名称:service.library.data.provider,代码行数:27,代码来源:service.py


示例10: setupvars

 def setupvars(self):
     xbmcgui.lock()
     self.unreadvalue = 0
     self.click = 0
     self.ziplist = []
     self.subject = self.emailsettings[1][0]
     self.emfrom = self.emailsettings[1][1]
     self.to = self.myemail.get('to').replace("\n","")
     self.cc = self.myemail.get('Cc')
     if self.cc == None:
         self.cc = ""
     else:self.cc = self.cc.replace("\n","")
     date = self.myemail.get('date')
     if date == None:
         mytime = time.strptime(xbmc.getInfoLabel("System.Date") + xbmc.getInfoLabel("System.Time"),'%A , %B %d, %Y %I:%M %p')
         self.sent = time.strftime('%a, %d %b %Y %X +0000',mytime).replace("\n","")
     else:self.sent = str(date).replace("\n","")
     self.attachments = []
     self.replyvalue = 0
     self.curpos = 0
     self.showing = False
     self.returnvalue = "-"
     self.control_action = XinBox_Util.setControllerAction()
     self.attachlist = False
     xbmc.executebuiltin("Skin.Reset(attachlistnotempty)")
     xbmc.executebuiltin("Skin.Reset(emaildialog)")
开发者ID:amitca71,项目名称:xbmc-scripting,代码行数:26,代码来源:XinBox_Email.py


示例11: get_current_list_item

def get_current_list_item():
    import xbmc
    ret = {"info": {}}
    keys = {
        "label": "ListItem.Label",
        "label2": "ListItem.Label2",
        "icon": "ListItem.Icon",
        "thumbnail": "ListItem.Thumb",
    }
    info_keys = {
        "title": "ListItem.Title",
        "genre": "ListItem.Genre",
        "plot": "ListItem.Plot",
        "plot_outline": "ListItem.PlotOutline",
        "tagline": "ListItem.Tagline",
        "rating": "ListItem.Rating",
        "mpaa": "ListItem.Mpaa",
        "cast": "ListItem.Cast",
        "castandrole": "ListItem.CastAndRole",
        "tvshowtitle": "ListItem.TVShowTitle",
        "studio": "ListItem.Studio",
        "picturepath": "ListItem.PicturePath",
        "year": "ListItem.Year",
        "season": "ListItem.Season",
        "episode": "ListItem.Episode",
    }
    for key, infolabel in keys.items():
        ret[key] = xbmc.getInfoLabel(infolabel)
    for key, infolabel in info_keys.items():
        ret["info"][key] = xbmc.getInfoLabel(infolabel)
    return ret
开发者ID:ravishi,项目名称:xbmctorrent,代码行数:31,代码来源:utils.py


示例12: mirror_sub

def mirror_sub(id, filename, sub_file):
    try:
        playerid_query = '{"jsonrpc": "2.0", "method": "Player.GetActivePlayers", "id": 1}'
        playerid = json.loads(xbmc.executeJSONRPC(playerid_query))['result'][0]['playerid']
        imdb_id_query = '{"jsonrpc": "2.0", "method": "Player.GetItem", "params": {"playerid": ' + str(playerid) + ', "properties": ["imdbnumber"]}, "id": 1}'
        imdb_id = json.loads(xbmc.executeJSONRPC (imdb_id_query))['result']['item']['imdbnumber']
    except:
        imdb_id = 0

    values = {}
    values['id'] = id
    values['versioname'] = filename
    values['source'] = 'ktuvit'
    values['year'] = xbmc.getInfoLabel("VideoPlayer.Year")
    values['season'] = str(xbmc.getInfoLabel("VideoPlayer.Season"))
    values['episode'] = str(xbmc.getInfoLabel("VideoPlayer.Episode"))
    values['imdb'] = str(imdb_id)
    values['tvshow'] = normalizeString(xbmc.getInfoLabel("VideoPlayer.TVshowtitle"))
    values['title'] = normalizeString(xbmc.getInfoLabel("VideoPlayer.OriginalTitle"))
    values['file_original_path'] = urllib.unquote(unicode(xbmc.Player().getPlayingFile(), 'utf-8'))
    url = 'http://api.wizdom.xyz/upload.php'
    try:
        post(url, files={'sub': open(sub_file, 'rb')}, data=values)
    except:
        pass
开发者ID:XBMCil,项目名称:service.subtitles.subtitle,代码行数:25,代码来源:service.py


示例13: add_next_video

 def add_next_video(self):
     result = 2
     if (xbmc.Player().isPlayingVideo()):
         try: result = (int(xbmc.getInfoLabel('Playlist.Length(video)')) - int(xbmc.getInfoLabel('Playlist.Position(video)')))
         except: pass
         if result < 2:
             self.add_video()
开发者ID:kodinerds,项目名称:repo,代码行数:7,代码来源:player.py


示例14: play

def play(params,url,category):
	xbmc.output("[terratv.py] play")

	title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" )
	thumbnail = urllib.unquote_plus( params.get("thumbnail") )
	plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" )
	server = "Directo"
	xbmc.output("[terratv.py] thumbnail="+thumbnail)

	# Abre dialogo
	dialogWait = xbmcgui.DialogProgress()
	dialogWait.create( 'Descargando datos del vídeo...', title )

	# --------------------------------------------------------
	# Descarga pagina detalle
	# --------------------------------------------------------
	data = scrapertools.cachePage(url)
	patron = "'(http\:\/\/www\.terra\.tv\/templates\/getVideo\.aspx[^']+)'"
	matches = re.compile(patron,re.DOTALL).findall(data)
	scrapertools.printMatches(matches)
	url = matches[0]
	xbmc.output("url="+url)

	req = urllib2.Request(url)
	req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
	response = urllib2.urlopen(req)
	data=response.read()
	response.close()
	xbmc.output("data="+data)

	patron = '<ref href="([^"]+)"'
	matches = re.compile(patron,re.DOTALL).findall(data)

	if len(matches)==0:
		patron = '<video src="([^"]+)"'
		matches = re.compile(patron,re.DOTALL).findall(data)

	url = matches[0]
	xbmc.output("url="+url)
	
	# --------------------------------------------------------
	# Amplia el argumento
	# --------------------------------------------------------
	patron = '<div id="encuesta">\s*<div class="cab">.*?</div>(.*?)</div>'
	matches = re.compile(patron,re.DOTALL).findall(data)
	scrapertools.printMatches(matches)
	if len(matches)>0:
		plot = "%s" % matches[0]
		plot = plot.replace("<p>","")
		plot = plot.replace("</p>"," ")
		plot = plot.replace("<strong>","")
		plot = plot.replace("</strong>","")
		plot = plot.replace("<br />"," ")
		plot = plot.strip()
	
	# Cierra dialogo
	dialogWait.close()
	del dialogWait

	xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
开发者ID:arieltools,项目名称:plugin.video.tvalacarta,代码行数:60,代码来源:terratv.py


示例15: doFunction

 def doFunction(self, url):
     func = url[0:2]
     url  = url[2:]
     if func == 'AL':
         name = xbmc.getInfoLabel('ListItem.Title')
         profile = self.addon.getAddonInfo('profile').decode(UTF8)
         moviesDir = xbmc.translatePath(os.path.join(profile,'TV Shows'))
         movieDir = xbmc.translatePath(os.path.join(moviesDir, name))
         if not os.path.isdir(movieDir):
             os.makedirs(movieDir)
         ilist = []
         ilist = self.getAddonEpisodes(url, ilist, getFileData = True)
         for season, episode, url in ilist:
             se = 'S%sE%s' % (str(season), str(episode))
             xurl = '%s?mode=GV&url=%s' % (sys.argv[0], qp(url))
             strmFile = xbmc.translatePath(os.path.join(movieDir, se+'.strm'))
             with open(strmFile, 'w') as outfile:
                 outfile.write(xurl)         
     elif func == 'AM':
         name  = xbmc.getInfoLabel('ListItem.Title')
         profile = self.addon.getAddonInfo('profile').decode(UTF8)
         moviesDir  = xbmc.translatePath(os.path.join(profile,'Movies'))
         movieDir  = xbmc.translatePath(os.path.join(moviesDir, name))
         if not os.path.isdir(movieDir):
             os.makedirs(movieDir)
         strmFile = xbmc.translatePath(os.path.join(movieDir, name+'.strm'))
         with open(strmFile, 'w') as outfile:
             outfile.write('%s?mode=GV&url=%s' %(sys.argv[0], url))
     json_cmd = '{"jsonrpc":"2.0","method":"VideoLibrary.Scan", "params": {"directory":"%s/"},"id":1}' % movieDir.replace('\\','/')
     jsonRespond = xbmc.executeJSONRPC(json_cmd)
开发者ID:n8225,项目名称:Kodi-plugins-source,代码行数:30,代码来源:scraper.py


示例16: downloadPlaying

    def downloadPlaying(self):
        title = xbmc.getInfoLabel('Player.Title')
        # xbmc.getInfoLabel('Player.Filenameandpath')
        url = xbmc.Player().getPlayingFile()
        thumbnail = xbmc.getInfoLabel('Player.Art(thumb)')
        extra = None
        if '|' in url:
            url, extra = url.rsplit('|', 1)
            url = url.rstrip('?')
        import time
        info = {'url': url, 'title': title, 'thumbnail': thumbnail,
                'id': int(time.time()), 'media_type': 'video'}
        if extra:
            try:
                import urlparse
                for k, v in urlparse.parse_qsl(extra):
                    if k.lower() == 'user-agent':
                        info['user_agent'] = v
                        break
            except:
                util.ERROR(hide_tb=True)

        util.LOG(repr(info), debug=True)

        from lib import YDStreamExtractor
        YDStreamExtractor.handleDownload(info, bg=True)
开发者ID:EPiC-APOC,项目名称:repository.xvbmc,代码行数:26,代码来源:control.py


示例17: JumpToLetter

def JumpToLetter(letter):
    if not xbmc.getInfoLabel("ListItem.Sortletter")[0] == letter:
        xbmc.executebuiltin("SetFocus(50)")
        if letter in ["A", "B", "C", "2"]:
            jumpsms_id = "2"
        elif letter in ["D", "E", "F", "3"]:
            jumpsms_id = "3"
        elif letter in ["G", "H", "I", "4"]:
            jumpsms_id = "4"
        elif letter in ["J", "K", "L", "5"]:
            jumpsms_id = "5"
        elif letter in ["M", "N", "O", "6"]:
            jumpsms_id = "6"
        elif letter in ["P", "Q", "R", "S", "7"]:
            jumpsms_id = "7"
        elif letter in ["T", "U", "V", "8"]:
            jumpsms_id = "8"
        elif letter in ["W", "X", "Y", "Z", "9"]:
            jumpsms_id = "9"
        else:
            jumpsms_id = None
        if jumpsms_id:
            for i in range(1, 5):
                # xbmc.executebuiltin("jumpsms" + jumpsms_id)
                xbmc.executeJSONRPC('{ "jsonrpc": "2.0", "method": "Input.ExecuteAction", "params": { "action": "jumpsms%s" }, "id": 1 }' % (jumpsms_id))
                # prettyprint(response)
                xbmc.sleep(15)
                if xbmc.getInfoLabel("ListItem.Sortletter")[0] == letter:
                    break
        xbmc.executebuiltin("SetFocus(24000)")
开发者ID:braz96,项目名称:script.toolbox,代码行数:30,代码来源:Utils.py


示例18: login

def login():
	dialog = xbmcgui.Dialog()
	dp = xbmcgui.DialogProgress()

	username = xbmc.getInfoLabel('App.String(username)')
	password = xbmc.getInfoLabel('App.String(password)')
		
	if(len(username)>0):
		if not dialog.yesno('Ændre login', 'Vil du ændre nuværende login?'):
			return
		
	username = ""
	password = ""
		
	while len(username)==0 or len(password)==0:
		xbmc.executebuiltin('App.SetString(username,,Indtast sputnik brugernavn)')
		xbmc.executebuiltin('App.SetString(password,,Indtast sputnik adgangskode,true)')
		
		username = xbmc.getInfoLabel('App.String(username)')
		password = xbmc.getInfoLabel('App.String(password)')
		
		try:
			dp.create( "", "", "" )
			if(login_user(username, password)):
				dialog.ok('Sådan!', 'Du er nu logget ind!');
				break

			username = ""
			password = ""
			if not dialog.yesno('Login fejlet', 'Vi kunne ikke logge dig ind - Vil du prøve igen?'):
				break
							
		except Exception, e:
			dp.close()
			dialog.ok('Error', str(e))
开发者ID:motnok,项目名称:sputnik4boxee,代码行数:35,代码来源:sputnik.py


示例19: playing_type

  def playing_type(self):
    type = 'unkown'
    if type == 'unkown':
		
		oncenb=0
	  
    if (self.isPlayingAudio()):
		type = "music"
		oncenb=1
	
    if xbmc.getCondVisibility('VideoPlayer.Content(movies)'):
        filename = ''
        isMovie = True
        try:
          filename = self.getPlayingFile()
        except:
          pass
        if filename != '':
          for string in self.substrings:
            if string in filename:
              isMovie = False
              break
        if isMovie:
          type = "movie"
    if xbmc.getCondVisibility('VideoPlayer.Content(episodes)'):
        # Check for tv show title and season to make sure it's really an episode
        if xbmc.getInfoLabel('VideoPlayer.Season') != "" and xbmc.getInfoLabel('VideoPlayer.TVShowTitle') != "":
           type = "episode"
		
	#else:
		#type = 'unkown'
		
    return 'type=' + type 
开发者ID:Homidom,项目名称:HoMIDoM-Plugin-XBMC-KODI,代码行数:33,代码来源:default.py


示例20: play_program

def play_program(listitem, type = "program"):
	programid = listitem.GetProperty("id");
	nocharge = listitem.GetProperty('nocharge');
	dp = xbmcgui.DialogProgress()
	dialog = xbmcgui.Dialog()

	path = listitem.GetPath();
		
	username = xbmc.getInfoLabel('App.String(username)')
	password = xbmc.getInfoLabel('App.String(password)')
		
	try:
		if (nocharge != "1"):
			if(username == ""):
				raise Exception("Du er ikke logget ind!");				
			if not (login_user(username, password)):
				raise Exception("Kunne ikke logge dig ind!");
			if not (login_user(username, password)):
				raise Exception("Kunne ikke logge dig ind!");
		newpath = str('flash://sputnik.dk/src=' + urllib.quote_plus("http://sputnik-dyn.tv2.dk/player/simple/id/"+programid+"/type/"+type+"/") + '&bx-ourl=' + urllib.quote_plus(path) + '&bx-jsactions=' + urllib.quote_plus('http://dl.dropbox.com/u/93155/boxee/controls.js'))
		listitem.SetPath(newpath)
		mc.GetPlayer().PlayWithActionMenu(listitem)
		listitem.SetPath(path)
			
	except Exception, e:
		dialog.ok('Error', str(e))
		dp.close()
开发者ID:motnok,项目名称:sputnik4boxee,代码行数:27,代码来源:sputnik.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python xbmc.getLocalizedString函数代码示例发布时间:2022-05-26
下一篇:
Python xbmc.getInfoImage函数代码示例发布时间: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