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

Python xbmc.executebuiltin函数代码示例

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

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



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

示例1: apagarinterrompido

def apagarinterrompido(tipo):
    try: os.remove(os.path.join(pastaperfil, tipo))
    except: pass
    try: os.remove(os.path.join(pastaperfil, tipo + '_info'))
    except: pass
    xbmc.executebuiltin("XBMC.Notification(wareztuga.tv," + traducao(40201) + ",'10000',"+iconpequeno.encode('utf-8')+")")
    xbmc.executebuiltin("XBMC.Container.Refresh")
开发者ID:KODeKarnage,项目名称:fightnight-addons,代码行数:7,代码来源:visto.py


示例2: synopsis_mode_video

def synopsis_mode_video():
	#####	Check for Preview files.
	PreviewFile = "0"
	for root, dirs, files in os.walk( _Resources_Preview ):
		for filename in files:
			PreviewFile = root + '\\' + filename
			Current_Window.setProperty( 'Synopsis_Video_Preview_Path', PreviewFile )
			Current_Window.setProperty( 'Synopsis_Video_Preview_Name', "Found "+filename )
	if PreviewFile == "0":
		log('|   No preview video found')
		xbmc.executebuiltin('Skin.Reset(SynopsisPreviewThere)')
	else:
		if PreviewFile.endswith('.xmv'):
			Current_Window.setProperty( 'Player_Type','DVDPlayer' )
			xbmc.executebuiltin('Skin.SetBool(SynopsisPreviewThere)')
		elif PreviewFile.endswith('.strm'):
			try:
				urllib2.urlopen('http://www.google.com', timeout=1)
				Current_Window.setProperty( 'Player_Type','MPlayer' )
				xbmc.executebuiltin('Skin.SetBool(SynopsisPreviewThere)')
			except urllib2.URLError as err:
				xbmc.executebuiltin('Skin.Reset(SynopsisPreviewThere)')
		else:
			Current_Window.setProperty( 'Player_Type','MPlayer' )
			xbmc.executebuiltin('Skin.SetBool(SynopsisPreviewThere)')
		log('|   Found ' + PreviewFile)
开发者ID:Rocky5,项目名称:XBMC4Kids,代码行数:26,代码来源:default.py


示例3: getEpisodeList

 def getEpisodeList(self, url):
     contentType,main_page = common.getData(url)
     episodeList = re.compile('<ol class="episode-list".*?</ol>').findall(main_page)
     episodes = re.compile('data-json.*?tooltipTitle&quot;:&quot;(.*?)&.*?:&quot;(.*?)&quot;.*?:&quot;(.*?)&.*?href="(.*?)"').findall(episodeList[0])
     for title, summary, img, url in episodes:
         episodeNum = re.compile('(\d.*?)/').findall(url)[0]
         contentType, page = common.getData('http://video2.walla.co.il/?w=null/null/' + episodeNum + '/@@/video/flv_pl')
         titleMatches = re.compile('<title>(.*?)</title>(.*)<subtitle>(.*?)<').findall(page)
         if (len(titleMatches)) == 1:
             title = titleMatches[0][0]
             images = re.compile('<preview_pic>(.*?)</preview_pic>').findall(page)
             if (len(images)) >= 1:
                 iconImage = images[0]
             details = re.compile('<synopsis>(.*?)</synopsis>').findall(page)
             if (len(details)) > 0:
                 epiDetails = details[0]
             
             timeInSeconds = re.compile('<duration>(.*?)</duration>').findall(page)
             if not timeInSeconds == None and not len(timeInSeconds[0]) <= 0:
                 time = int(timeInSeconds[0]) / 60
             else:
                 time = '00:00'
             url = 'rtmp://waflaWBE.walla.co.il/ app=vod/ swfvfy=true swfUrl=http://i.walla.co.il/w9/swf/video_swf/vod/walla_vod_player_adt.swf?95 tcurl=rtmp://waflaWBE.walla.co.il/vod/ pageurl=http://walla.co.il/ playpath=' + re.compile('<src>(.*?)</src>').findall(page)[0]
             common.addLink(contentType,title, url, iconImage, str(time), epiDetails)
     nextPage = re.compile('<a class="in_blk p_r" href="(.*?)" style=""></a>').findall(main_page)
     if (len(nextPage)) > 0:
         addDir('UTF-8',__language__(30001), __BASE_URL__ + nextPage[0], self.MODES.GET_EPISODES_LIST, 'DefaultFolder.png', __NAME__)
     xbmcplugin.setContent(int(sys.argv[1]), 'episodes')
     xbmc.executebuiltin("Container.SetViewMode(500)")
开发者ID:samikadosh,项目名称:xbmc-israel,代码行数:29,代码来源:module_318.py


示例4: do_startup_task

def do_startup_task(task):
    run_on_startup=ADDON.get_setting('auto-%s' % task)=='true' and ADDON.get_setting('%s-during-startup' % task) == 'true' 
    if run_on_startup and not xbmc.abortRequested:
        log_utils.log('Service: Running startup task [%s]' % (task))
        now = datetime.datetime.now()
        xbmc.executebuiltin('RunPlugin(plugin://%s/?mode=%s)' % (ADDON.get_id(), task))
        db_connection.set_setting('%s-last_run' % (task), now.strftime("%Y-%m-%d %H:%M:%S.%f"))
开发者ID:SNAPflix,项目名称:salts,代码行数:7,代码来源:utils.py


示例5: MAIN

def MAIN(murl):
    if 'TV' in murl:
        main.addDir('Movies','MOVIES',451,art+'/shush.png')
        link=main.OPENURL('http://www.shush.se/index.php?shows')
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('&raquo;','')
        match=re.compile('(?sim)class="shows"><a href="([^"]+)"><img src="([^"]+)" alt="Watch (.+?) online').findall(link)
        for url,thumb,name in match:
            main.addDirT(name.title(),'http://www.shush.se/'+url,452,thumb,'','','','','')
    else:
        main.addDir('TV','TV',451,art+'/shush.png')
        link=main.OPENURL('http://www.shush.se/index.php?movies')
        link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','').replace('&raquo;','')
        match=re.compile('(?sim)class="shows"><a href="([^"]+)"><img src="([^"]+)" alt="([^"]+)" title=').findall(link)
        dialogWait = xbmcgui.DialogProgress()
        ret = dialogWait.create('Please wait until Movie list is cached.')
        totalLinks = len(match)
        loadedLinks = 0
        remaining_display = 'Movies loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display)
        xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)")
        for url,thumb,name in match:
            main.addPlayM(name.title(),'http://www.shush.se/'+url,453,thumb,'','','','','')
            loadedLinks = loadedLinks + 1
            percent = (loadedLinks * 100)/totalLinks
            remaining_display = 'Movies loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
            dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
            if (dialogWait.iscanceled()):
                    return False   
        dialogWait.close()
        del dialogWait
开发者ID:Ladeiras,项目名称:AutoUpdate,代码行数:30,代码来源:shush.py


示例6: LISTSHOWS

def LISTSHOWS(murl,channel,index=False):
    link=main.OPENURL(murl)
    link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
    match = re.findall('<div class="titleline"><h2 class="forumtitle"><a href="(.+?)">(.+?)</a></h2></div>',link)
    label='TV Shows'
    if not len(match) > 0:
        match = re.findall('<h3 class="threadtitle">.+?<a class=".+?" href="(.+?)" id=".+?">(.+?)</a></h3>', link)
        label = 'Movies'
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until ' + label + ' Show list is cached.')
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = label + ' loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
    dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display)
    xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)")
    for url,name in match:
        if "color" in name:
            name=name.replace('<b><font color=red>','[COLOR red]').replace('</font></b>','[/COLOR]')
            name=name.replace('<b><font color="red">','[COLOR red]').replace('</font></b>','[/COLOR]')
        if label == 'Movies':
            main.addDirX(name, MainUrl+url,39,'',searchMeta=True, metaType='Movies')
        else:
            main.addTVInfo(name,MainUrl+url,38,getShowImage(channel,name),'','')
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100)/totalLinks
        remaining_display = label + ' loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
        if dialogWait.iscanceled(): return False   
    dialogWait.close()
    del dialogWait
    xbmcplugin.setContent(int(sys.argv[1]), label)
    main.VIEWS()
开发者ID:cmdnath,项目名称:innovate-dev,代码行数:32,代码来源:desitv.py


示例7: apt_commit_complete

	def apt_commit_complete(self):

		# on commit complete, remove the notification from the Home window

		self.window.setProperty('OSMC_notification', 'false')

		# remove the file that blocks further update checks
		try:
			os.remove(self.block_update_file)
		except:
			pass

		if self.check_if_reboot_required():
			# the files flagging that an installed package needs a reboot are present


			# 0 "Prompt for all actions" -- PROMPT
			# 1 "Display icon on home screen only" -- PROMPT
			# 2 "Download updates, then prompt" -- PROMPT
			# 3 "Download and display icon" -- PROMPT
			# 4 "Download, install, prompt if restart needed" -- PROMPT

			# display dialogue saying that osmc needs to reboot
			reboot = DIALOG.yesno(lang(32077), lang(32079), lang(32080), yeslabel=lang(32081), nolabel=lang(32082))

			if reboot:

				exit_osmc_settings_addon()
				xbmc.sleep(1000)
				
				xbmc.executebuiltin('Reboot')

			else:
				# skip further update checks until osmc has rebooted
				self.skip_update_check = True 
开发者ID:eldridgemartinez,项目名称:osmc,代码行数:35,代码来源:update_service.py


示例8: set_view

def set_view(view_mode, view_code=0):
    _log("set_view view_mode='"+view_mode+"', view_code="+str(view_code))

    # Set the content for extended library views if needed
    if view_mode==MOVIES:
        _log("set_view content is movies")
        xbmcplugin.setContent( int(sys.argv[1]) ,"movies" )
    elif view_mode==TV_SHOWS:
        _log("set_view content is tvshows")
        xbmcplugin.setContent( int(sys.argv[1]) ,"tvshows" )
    elif view_mode==SEASONS:
        _log("set_view content is seasons")
        xbmcplugin.setContent( int(sys.argv[1]) ,"seasons" )
    elif view_mode==EPISODES:
        _log("set_view content is episodes")
        xbmcplugin.setContent( int(sys.argv[1]) ,"episodes" )

    # Reads skin name
    skin_name = xbmc.getSkinDir()
    _log("set_view skin_name='"+skin_name+"'")

    try:
        if view_code==0:
            _log("set_view view mode is "+view_mode)
            view_codes = ALL_VIEW_CODES.get(view_mode)
            view_code = view_codes.get(skin_name)
            _log("set_view view code for "+view_mode+" in "+skin_name+" is "+str(view_code))
            xbmc.executebuiltin("Container.SetViewMode("+str(view_code)+")")
        else:
            _log("set_view view code forced to "+str(view_code))
            xbmc.executebuiltin("Container.SetViewMode("+str(view_code)+")")
    except:
        _log("Unable to find view code for view mode "+str(view_mode)+" and skin "+skin_name)
开发者ID:Jmlaguna89,项目名称:miNuevoRepo,代码行数:33,代码来源:plugintools.py


示例9: show_Msg

def show_Msg(heading, message, times = 3000, pics = addon_icon):
    try: xbmc.executebuiltin('XBMC.Notification("%s", "%s", %s, "%s")' % (heading.encode('utf-8'), message.encode('utf-8'), times, pics.encode('utf-8')))
    except Exception, e:
        print( '[%s]: ShowMessage: Transcoding UTF-8 failed [%s]' % (addon_id, e), 2 )
        try: xbmc.executebuiltin('XBMC.Notification("%s", "%s", %s, "%s")' % (heading, message, times, pics))
        except Exception, e:
            print( '[%s]: ShowMessage: exec failed [%s]' % (addon_id, e), 3 )
开发者ID:Alsocogi,项目名称:repository.catoal,代码行数:7,代码来源:acecore.py


示例10: __init__

	def __init__( self, *args, **kwargs ):
		if sys.argv[1] == "changelog":
			changelog = self.openfile('changelog.txt')
			self.text(changelog,'Changelog')
		elif sys.argv[1] == "license":
			texto = self.openfile('LICENSE.txt')
			self.text(texto,traducao(1004))
		elif sys.argv[1] == "version":
			try:
				codigo_fonte=self.abrir_url('http://anonymous-repo.googlecode.com/svn/trunk/anonymous-repo-adults/plugin.video.adultstv/addon.xml')
				match=re.compile('version="(.+?)"').findall(codigo_fonte)[1]
			except: match='error'
			if match=='error': xbmcgui.Dialog().ok(traducao(2010),traducao(2059),traducao(2060))
			elif match!=selfAddon.getAddonInfo('version'):xbmcgui.Dialog().ok(traducao(2061)+' ('+match+')',traducao(2062))
			else: xbmcgui.Dialog().ok('Adults TV', traducao(2063))
		elif sys.argv[1] == "xbmctools": xbmcgui.Dialog().ok('XBMC Tools',traducao(2065),traducao(2064))
		elif sys.argv[1] == "disclaimer": self.text(traducao(1003),'Disclaimer')
		elif sys.argv[1] == "help": self.text(traducao(2066)+'\n\ni96751414\nAnonymous',traducao(2067))
		elif sys.argv[1] == "import":
			dir = xbmcgui.Dialog().browse(1,traducao(2072),"myprograms").replace('\\','/')
			if dir == '': return
			if self.file_name(dir) != 'bla.zip':
				xbmcgui.Dialog().ok(traducao(2010),traducao(2073))
				return
			dest = os.path.join(addonfolder,'resources','lib')
			xbmc.executebuiltin('XBMC.Extract('+dir+','+dest+')')
			xbmcgui.Dialog().ok(traducao(2070),traducao(2075))
开发者ID:Stevie-Bs,项目名称:anonymous-repo,代码行数:27,代码来源:viewer.py


示例11: download

def download(url, dest, title=None, referer=None, agent=None, cookie=None, silent=False):
    if not title:
        title  = 'Kodi Download'

    if not referer:
        referer  = ''

    if not agent:
        agent  = ''

    if not cookie:
        cookie  = ''

    #quote parameters
    url     = urllib.quote_plus(url)
    dest    = urllib.quote_plus(dest)
    title   = urllib.quote_plus(title)
    referer = urllib.quote_plus(referer)
    agent   = urllib.quote_plus(agent)
    cookie  = urllib.quote_plus(cookie)

    script = inspect.getfile(inspect.currentframe())
    cmd    = 'RunScript(%s, %s, %s, %s, %s, %s, %s, %s)' % (script, url, dest, title, referer, agent, cookie, silent)

    xbmc.executebuiltin(cmd)
开发者ID:yokod,项目名称:featherence,代码行数:25,代码来源:commondownloader.py


示例12: ATLES

def ATLES():
    r = requests.get('https://voila.metabroadcast.com/1.0/schedules/?annotations=broadcasts,images,description&apiKey=public:64a03c33f9a64c2b80b6f58cd218e5c8&from=now&count=1&id=hmfk,hmfj,hmfh,hmfg,hmff,hmfd,hmfc,hmfb,hm7x,hmb5,hmb4,hkzf,hn46,hn45,hm7h,hn4f,hn4d,hn4b,hmd6,hn4m,hn4k,hn4h,hn4v,hn4w,hn4r,hn4z,hn4x,hn4y,hmv9,hkzr,hk78,hk79,hk76,hkqs,hk72,hmbs,hmbr,hmbq,hmbv,hmbt,hm74,hmbx,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z6,hnz7,hnz2,hnx9,hm5c,hn7y,hn7q,hn7t,hn7k,hn7c,hn7d,hpdp,hpdr,hpdw,hpdb,hpdc,hpdd,hpdf,hpdm,hk4c,hk4b,hk4g,hk4f,hk4d,hk4k,hk4j,hk4h,hk4n,hk4m,hk4s,hk4r,hk4q,hk4p,hk4w,hk4v,hk4t,hk4z,hk4y,hk4x,hpc8,hk42,hk47,hk46,hk45,hk44,hk49,hk48,hm77,hmqf,hmqt,hnxg,hnw9,hmc5,hmc6,hnw7,hnw6,hnw5,hnw4,hkz9,hkz8,hnwz,hnwy,hnwx,hmcv,hmcx,hmcy,hmcz,hmpy,hmcb,hmcf,hmcg,hmcj,hmck,hmcm,hmcn,hm4h,hkt7,hm4r,hkt9,hkt8,hm4z,hnbd,hktk,hktj,hkth,hnbh,hktn,hktm,hnxy,hktr,hktq,hktp,hktw,hktv,hktz,hkty,hmxb')
    match=re.compile('image":"(.+?)".+?parent":{"title":"(.+?)","id":".+?"},"start_date":".+?","id":"(.+?)".+?content":\[{"id":".+?","type":"(.+?)","title":"(.+?)","description":"(.+?)","image":"(.+?)"').findall(r.content)
    for channel,name,ids,types,title,description,image in match:
        addDir3('%s  -   [COLOR yellow] Now: - %s[/COLOR]'%(name,title),ids,15,channel,image,'[COLOR yellow]%s[/COLOR] - %s'%(types,description))
    xbmcplugin.setContent(int(sys.argv[1]), 'movies')
    xbmc.executebuiltin("Container.SetViewMode(515)")
开发者ID:tienvu3436,项目名称:Pipcan-Repo,代码行数:7,代码来源:default+-+Copy.py


示例13: PASTEBIN

def PASTEBIN(url):
    try:
        if url == 'ADD':
            dialog = xbmcgui.Dialog()
            dialog.ok("TIP!", 'Read The Readme For Help On Channel Names & CTRL V To Paste') 
            searchStr = ''
            keyboard = xbmc.Keyboard(searchStr, 'Pastebin Url')
            keyboard.doModal()
            if (keyboard.isConfirmed()==False):
                return
            searchStr=keyboard.getText()
            if len(searchStr) == 0:
                return
            else:
                url = searchStr
                ret = dialog.select('Select A Slot To Save To', ['Slot 1', 'Slot 2'])
                if ret == 0:
                    save = ADDON.setSetting('PASTE1',url)
                    xbmc.executebuiltin('Container.Refresh')
                    dialog.ok("SAVED", "SAVED")
    
                if ret == '1':
                    save = ADDON.setSetting('PASTE2',url)
                    xbmc.executebuiltin('Container.Refresh')
                    dialog.ok("SAVED", "SAVED")
    except:
        pass
开发者ID:tienvu3436,项目名称:Pipcan-Repo,代码行数:27,代码来源:default+-+Copy.py


示例14: IPTV3

def IPTV3():
        try: 
            r = requests.get(ADDON.getSetting('PASTE1'))
            match=re.compile('#EXTINF:.+?,(.+?)[\n<"].+?http(.+?)[\n#>" ]', re.DOTALL).findall(r.text.replace('\n\n','\n'))
            for name,url in match:
                GRAB(name,url)
        except:
            pass
        try: 
            r = requests.get(ADDON.getSetting('PASTE2'))
            match=re.compile('#EXTINF:.+?,(.+?)[\n<"].+?http(.+?)[\n#>" ]', re.DOTALL).findall(r.text.replace('\n\n','\n'))
            for name,url in match:
                GRAB(name,url)
        except:
            pass
        try: 
            r = open(ADDON.getSetting('PASTE1'),'r')
            match=re.compile('#EXTINF:.+?,(.+?)[\n<"].+?http(.+?)[\n#>" ]', re.DOTALL).findall(r.read())
            for name,url in match:
                GRAB(name,url)
        except:
            pass
        try: 
            r = open(ADDON.getSetting('PASTE2'),'r')
            match=re.compile('#EXTINF:.+?,(.+?)[\n<"].+?http(.+?)[\n#>" ]', re.DOTALL).findall(r.read())
            for name,url in match:
                GRAB(name,url)
        except:
            pass
        xbmcplugin.setContent(int(sys.argv[1]), 'movies')
        xbmc.executebuiltin("Container.SetViewMode(515)")
开发者ID:tienvu3436,项目名称:Pipcan-Repo,代码行数:31,代码来源:default+-+Copy.py


示例15: downloader_is

def downloader_is(url, name, showProgress=True):
	import downloader, extract

	addonsDir = xbmc.translatePath(os.path.join('special://home', 'addons')).decode("utf-8")
	packageFile = os.path.join(addonsDir, 'packages', 'isr.zip')
	'''
	try:
		os.remove(packageFile)
	except:
		pass
	'''	
	if showProgress:
		dp = xbmcgui.DialogProgress()
		dp.create(AddonName, "Downloading", name, "Please Wait")
		downloader.download(url, packageFile, dp)
		dp.update(0, "", "Extracting Zip Please Wait")
		extract.all(packageFile, addonsDir, dp)
	else:
		urllib.urlretrieve(url, packageFile)
		extract.all(packageFile, addonsDir)
		
	try:
		os.remove(packageFile)
	except:
		pass
			
	xbmc.executebuiltin("UpdateLocalAddons")
	xbmc.executebuiltin("UpdateAddonRepos")
开发者ID:vog31,项目名称:xbmc-israel,代码行数:28,代码来源:common.py


示例16: panPlay

def panPlay():
    li = xbmcgui.ListItem(_station[0])
    li.setPath("special://home/addons/%s/silent.m4a" % _plugin)
    li.setProperty(_plugin, _stamp)
    li.setProperty('mimetype', 'audio/aac')

    _lock.acquire()
    start = time.time()
    panFill()

    while not _play:
        time.sleep(0.01)
        xbmc.sleep(1000)

        if xbmc.abortRequested:
            _lock.release()
            exit()

        if (threading.active_count() == 1) or ((time.time() - start) >= 60):
            if _play: break	# check one last time before we bail

            xbmc.log("%s.Play BAD (%13s, %ds)" % (_plugin, _stamp, time.time() - start))
            xbmcgui.Dialog().ok(_name, 'No Tracks Received', '', 'Try again later')
            exit()

    _playlist.clear()
    _lock.release()
    time.sleep(0.01)	# yield to the song threads
    xbmc.sleep(1000)	# might return control to xbmc and skip the other threads ?

    xbmcplugin.setResolvedUrl(_handle, True, li)
    _player.play(_playlist)
    xbmc.executebuiltin('ActivateWindow(10500)')

    xbmc.log("%s.Play  OK (%13s)           '%s - %s'" % (_plugin, _stamp, _station.id[-4:], _station.name))
开发者ID:ClashTheBunny,项目名称:gominoa-xbmc-addons,代码行数:35,代码来源:default.py


示例17: getCategoryItems

    def getCategoryItems(self, url, page):
        print "*** Get category items %s" % url
        page_url = "%s/page/%s/" % (url, str(int(page)))
        response = common.fetchPage({"link": page_url})
        items = 0

        if response["status"] == 200:
            content = common.parseDOM(response["content"], "div", attrs={"id": "page_content"})
            movie = common.parseDOM(content, "div", attrs={"class": "movie_teaser clearfix"})

            header = common.parseDOM(movie, "h2")
            links = common.parseDOM(header, "a", ret="href")
            titles = common.parseDOM(header, "a")

            poster = common.parseDOM(movie, "li", attrs={"class": "movie_teaser_poster"})
            images = common.parseDOM(poster, "img", ret="src")

            teaser = common.parseDOM(movie, "div", attrs={"class": "teaser_info"})
            descs = common.parseDOM(teaser, "div", attrs={"class": "teaser_desc"})

            infos = common.parseDOM(teaser, "ul", attrs={"class": "teaser_ads"})

            ratings = common.parseDOM(movie, "li", attrs={"class": "current-rating"})
            pagenav = common.parseDOM(response["content"], "div", attrs={"id": "pagenav"})

            for i, title in enumerate(titles):
                items += 1
                info = common.parseDOM(infos[i], "li")

                image = images[i]
                genre = self.encode(', '.join(common.parseDOM(info[2], "a")))
                year = info[1].split('</span>')[-1]
                desc = common.stripTags(self.encode(descs[i]))
                rating = int(ratings[i])/10 if ratings[i] > 0 else None

                try:
                    tmp = year.split(' ')
                    year = tmp[0]
                    season = tmp[1]+tmp[2]
                    title = "%s %s %s" % (self.encode(title), self.encode(season), year)

                except IndexError:
                    title = "%s (%s)" % (self.encode(title), year)

                uri = sys.argv[0] + '?mode=show&url=%s' % (links[i])
                item = xbmcgui.ListItem(title, iconImage=self.icon, thumbnailImage=self.url+image)
                item.setInfo(type='Video', infoLabels={'title': title, 'genre': genre, 'plot': desc, 'rating': rating})

                xbmcplugin.addDirectoryItem(self.handle, uri, item, True)

        else:
            self.showErrorMessage("getCategoryItems(): Bad response status%s" % response["status"])

        if pagenav and not items < 10:
            uri = sys.argv[0] + '?mode=%s&url=%s&page=%s' % ("category", url, str(int(page) + 1))
            item = xbmcgui.ListItem("Next page >>", thumbnailImage=self.inext)
            xbmcplugin.addDirectoryItem(self.handle, uri, item, True)

        xbmc.executebuiltin('Container.SetViewMode(52)')
        xbmcplugin.endOfDirectory(self.handle, True)
开发者ID:faisalz2015,项目名称:xbmc-gotham,代码行数:60,代码来源:default.py


示例18: do_scheduled_task

def do_scheduled_task(task, isPlaying):
    global last_check
    now = datetime.datetime.now()
    if kodi.get_setting("auto-%s" % task) == "true":
        if last_check < now - datetime.timedelta(minutes=1):
            # log_utils.log('Check Triggered: Last: %s Now: %s' % (last_check, now), log_utils.LOGDEBUG)
            next_run = get_next_run(task)
            last_check = now
        else:
            # hack next_run to be in the future
            next_run = now + datetime.timedelta(seconds=1)

        # log_utils.log("Update Status on [%s]: Currently: %s Will Run: %s Last Check: %s" % (task, now, next_run, last_check), xbmc.LOGDEBUG)
        if now >= next_run:
            is_scanning = xbmc.getCondVisibility("Library.IsScanningVideo")
            if not is_scanning:
                during_playback = kodi.get_setting("%s-during-playback" % (task)) == "true"
                if during_playback or not isPlaying:
                    log_utils.log("Service: Running Scheduled Task: [%s]" % (task))
                    builtin = "RunPlugin(plugin://%s/?mode=%s)" % (kodi.get_id(), task)
                    xbmc.executebuiltin(builtin)
                    db_connection.set_setting("%s-last_run" % task, now.strftime("%Y-%m-%d %H:%M:%S.%f"))
                else:
                    log_utils.log("Service: Playing... Busy... Postponing [%s]" % (task), log_utils.LOGDEBUG)
            else:
                log_utils.log("Service: Scanning... Busy... Postponing [%s]" % (task), log_utils.LOGDEBUG)
开发者ID:fergyc,项目名称:tknorris-beta-repo,代码行数:26,代码来源:utils.py


示例19: LISTEPISODES

def LISTEPISODES(tvshowname,url):
    link=main.OPENURL(url)
    link=link.replace('\r','').replace('\n','').replace('\t','').replace('&nbsp;','')
    match = re.findall('<a class=".+?" href="(.+?)" id=".+?">(.+?)</a>',link)
    dialogWait = xbmcgui.DialogProgress()
    ret = dialogWait.create('Please wait until ['+tvshowname+'] Episodes are cached.')
    totalLinks = len(match)
    loadedLinks = 0
    remaining_display = 'Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
    dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display)
    xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)")
    for url,name in match:
        if "Online" not in name: continue
        name=name.replace(tvshowname,'').replace('Watch Online','')
        name=main.removeNonASCII(name)
        main.addTVInfo(name,MainUrl+url,39,'','','') 
        loadedLinks = loadedLinks + 1
        percent = (loadedLinks * 100)/totalLinks
        remaining_display = 'Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
        dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
        if dialogWait.iscanceled(): return False   
    match=re.findall('<div id="above_threadlist" class="above_threadlist">(.+?)</div>',link)
    for string in match:
        match1=re.findall('<a href="(.+?)" title="(.+?)">[0-9]+</a>', string)
        for url, page in match1:
            main.addTVInfo(page,MainUrl+url,38,'','','')
    dialogWait.close()
    del dialogWait
    xbmcplugin.setContent(int(sys.argv[1]), 'TV Shows')
    main.VIEWS()
开发者ID:cmdnath,项目名称:innovate-dev,代码行数:30,代码来源:desitv.py


示例20: PLAY

def PLAY(name,url):
    ok=True
    hname=name
    name  = name.split('[COLOR blue]')[0]
    name  = name.split('[COLOR red]')[0]
    infoLabels = main.GETMETAT(name,'','','')
    video_type='movie'
    season=''
    episode=''
    img=infoLabels['cover_url']
    fanart =infoLabels['backdrop_url']
    imdb_id=infoLabels['imdb_id']
    infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }

    try:
        xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
        stream_url = urlresolver.resolve(url)

        infoL={'Title': infoLabels['metaName'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
        from resources.universal import playbackengine
        player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
        player.KeepAlive()
        return ok
    except Exception, e:
        if stream_url != False:
                main.ErrorReport(e)
        return ok
开发者ID:rjt2,项目名称:Kasiks-Repo,代码行数:27,代码来源:couchtuner.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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