TOOLSP
"
WELCOME !

Please ! USE [CODE] tags for your LINKS and CODE.

Favor usar balisas [CODE] para sus vínculos y código.

Merci d'utiliser les balises [CODE] pour vos liens et code.


[code]http://Thank.you[/code]
"
*** Doc. Kodi & PYthon ***
.
.
Python & Modules PY
.
.
.
.
(Video) Cache Kodi
.
.
.
Addons Kodi
.
.
.
Addons Kodi
.
.
*** GITHUB ***
.
.
URLresolver (J.S.) [GIT] +
.
.
.
URLresolver (elD.) [GIT] -
.
.
URLresolver (tvA.) [GIT] -
.
.
.
.
Cloudflare (external) [GIT]
.
.
.
*** Associated ***
.
Pastebin Your list online
.
mediafire Upload Files
.
imgur Upload Pics
lyngsat TV logos collection
transparent .png
.
http://hola.org free? VPN
Hola.apk free? VPN App.
.
hidester- free Proxy
.
webgrabplus EPG - Eng
xmltv EPG - Fr
kazer EPG - Fr
.
.wordreference Traduction
.
mail.com (fast sign-in)
.
.
FRIENDS / PARTNERS

£$π community

créer un forum


Playing with " executebuiltin " in £$π

Go down

Playing with " executebuiltin " in £$π Empty Playing with " executebuiltin " in £$π

Post by jujuuj on Fri 23 Nov - 4:12

executebuiltin is a function of Kodi you can call from £$π.

It allows you to do funny and sometimes useful things.

https://kodi.wiki/view/List_of_built-in_functions  
https://kodi.wiki/view/Special_protocol  
https://codedocs.xyz/xbmc/xbmc/group__python.html


Here comes some examples ...


Last edited by jujuuj on Fri 23 Nov - 4:29; edited 1 time in total
jujuuj
jujuuj

Messages : 261
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Playing with " executebuiltin " in £$π Empty Re: Playing with " executebuiltin " in £$π

Post by jujuuj on Fri 23 Nov - 4:20



EXAMPLES

Code:

 
 
  <item>
<title>EXEC : NOTIF</title>
<link>$doregex[exebuilt]</link>
<regex>
<name>exebuilt</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('XBMC.Notification(HELLO,I  LOVE  YOU,5000)') 
]]></expres>
<NOTPlayable>True</NOTPlayable>
<page></page>
</regex>
</item>

xbmc.executebuiltin('Notification(%s, %s, %d, %s)'%(addonname, errorline2, time, infoicon))

 
 
 
 
<item>
<title>OK  Favourites  executebuiltin </title>
<link>https://www.tvaddons.ag/forums/$doregex[id]</link>
<regex>
<name>id</name>
<expres>$pyFunction:xbmc.executebuiltin('ActivateWindow(10134)')</expres>
<page></page>
<NOTPlayable>True</NOTPlayable>
</regex>
</item>

 


  <item>
<title>OK  system-settings  executebuiltin("ActivateWindow(systemsettings)")</title>
<link>$doregex[exebuilt]</link>
<regex>
<name>exebuilt</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin("ActivateWindow(systemsettings)")
]]></expres>
<page></page>
</regex>
</item>


 
  <item>
<title>OK  Kodi Home  executebuiltin("ActivateWindow(0)")</title>
<link>$doregex[exebuilt]</link>
<regex>
<name>exebuilt</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin("ActivateWindow(0)")
]]></expres>
<page></page>
</regex>
</item>




  <item>
<title>OK  Kodi Home  executebuiltin("ActivateWindow(Home)") /title>
<link>$doregex[exebuilt]</link>
<regex>
<name>exebuilt</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin("ActivateWindow(Home)")
]]></expres>
<page></page>
</regex>
</item>








jujuuj
jujuuj

Messages : 261
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Playing with " executebuiltin " in £$π Empty Re: Playing with " executebuiltin " in £$π

Post by jujuuj on Fri 23 Nov - 4:25



MORE :

Code:



  <item>
<title>SOUND interrupted after 20secs  </title>
<link>$doregex[exebuilt]</link>
<regex>
<name>exebuilt</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc, time
 xbmc.executebuiltin('PlayMedia("http://lyd.nrk.no/nrk_radio_p1_ostlandssendingen_mp3_h",1)')
 time.sleep( 20 )
]]></expres>
<page></page>
<NOTPlayable>True</NOTPlayable>
</regex>
</item>





  <item>
<title>SOUND. OK even if error because link='' (is empty) </title>
<link>$doregex[exebuilt]</link>
<regex>
<name>exebuilt</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('PlayMedia("http://lyd.nrk.no/nrk_radio_p1_ostlandssendingen_mp3_h",1)')
 return ''
]]></expres>
<page></page>
<NOTPlayable>True</NOTPlayable>
</regex>
</item>
... Note that : in that second item,  the $doregex should be in <title> instead of <link> ...


option  ,1
option notplayable
are useful !

more options : repeatall and random (if local playlist of musics)

THIS works for sounds , and/or ... slideshows

U can use this in item, xml

or put it in autoexec.py    if you want "this" to play when opening kodi.



Last edited by jujuuj on Fri 23 Nov - 4:47; edited 4 times in total
jujuuj
jujuuj

Messages : 261
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Playing with " executebuiltin " in £$π Empty Re: Playing with " executebuiltin " in £$π

Post by jujuuj on Fri 23 Nov - 4:27


ONLY FOR ANDROID :

Code:


<item>
<title> executebuiltin SHOW Android appS  </title>
<link>$doregex[exebuilt]</link>
<regex>
<name>exebuilt</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('ActivateWindow(10001,"androidapp://sources/apps/",return)')
]]></expres>
<page></page>
</regex>
</item>
 
  this first item should (*) open a list of your apps, so you can "add to favourites" any link to app, in order to know (opening the favs file) what is the precise name of the app to put after StartAndroidActivity("

 (* Tested and working on skin titan)
 
<item>
<title>Android : APK  Acestream.engine  (org.acestream.media.atv)</title>
<link>$doregex[android]</link>
<regex>
<name>android</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('XBMC.StartAndroidActivity("org.acestream.media.atv")')
 #return ''
]]></expres>
<page></page>
</regex>
</item>

 
 
 
 
 
<item>
<title>Android : APK  File.Explorer.wifi.PRO  (APTOIDE)  "com.sandalgroup.fileexplorerwifipro"</title>
<link>$doregex[android]</link>
<regex>
<name>android</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('XBMC.StartAndroidActivity("com.sandalgroup.fileexplorerwifipro")')
 #return ''
]]></expres>
<page></page>
</regex>
</item>
 
 
 
 
 
<item>
<title>Android : APK  WiFi.File.Explorer  </title>
<link>$doregex[android]</link>
<regex>
<name>android</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('XBMC.StartAndroidActivity("com.dooblou.WiFiFileExplorer")')
 #return ''
]]></expres>
<page></page>
</regex>
</item>

 
 
 
 

<item>
<title>Android : APK  Smart.Youtube.tv  (APTOIDE)  </title>
<link>$doregex[android]</link>
<regex>
<name>android</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('XBMC.StartAndroidActivity("com.firsthash.smartyoutubetv2")')
 #return ''
]]></expres>
<page></page>
</regex>
</item>






<item>
<title>Android : APK  Youtube.tv</title>
<link>$doregex[android]</link>
<regex>
<name>android</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('XBMC.StartAndroidActivity("com.google.android.youtube.tv")')
 #return ''
]]></expres>
<page></page>
</regex>
</item>




 
 
 
 
  <item>
<title> executebuiltin('fbox.replay  </title>
<link>$doregex[exebuilt]</link>
<regex>
<name>exebuilt</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('StartAndroidActivity("fr.freebox.catchupstore")')
]]></expres><page></page></regex></item>
 
 

 
 
 
 
  <item>
<title> executebuiltin('fbox.tv  </title>
<link>$doregex[exebuilt]</link>
<regex>
<name>exebuilt</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('StartAndroidActivity("fr.freebox.tv")')
]]></expres><page></page></regex></item>

 
 


<item>
<title>Android : APK  Tele.7.jours</title>
<link>$doregex[android]</link>
<regex>
<name>android</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('XBMC.StartAndroidActivity("com.ldf.tele7.view")')
 #return ''
]]></expres>
<page></page>
</regex>
</item>






  <item>
<title>Android : APK  "lex Web.browser"</title>
<link>$doregex[android]</link>
<regex>
<name>android</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('XBMC.StartAndroidActivity("lex.com.webbrowser")')
  ]]></expres>
<page></page>
</regex>
</item>
jujuuj
jujuuj

Messages : 261
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Playing with " executebuiltin " in £$π Empty Re: Playing with " executebuiltin " in £$π

Post by jujuuj on Fri 23 Nov - 4:28


It opens new possibilities ... Right ?

Please, SHARE YOUR IDEAS !
jujuuj
jujuuj

Messages : 261
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Playing with " executebuiltin " in £$π Empty Re: Playing with " executebuiltin " in £$π

Post by jujuuj on Fri 23 Nov - 4:55



lien £$π
xbmc.executebuiltin('ActivateWindow(10502,"plugin://plugin.video.live.streamspro/?



lien F4µ
xbmc.executebuiltin('PlayMedia("plugin://plugin.video.live.streamspro/?url=plugin%3A%2F%2Fplugin.video.f4mTester%2F%3

jujuuj
jujuuj

Messages : 261
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Playing with " executebuiltin " in £$π Empty Re: Playing with " executebuiltin " in £$π

Post by jujuuj on Fri 23 Nov - 15:18


Played History of Addon Plexus  (Acestreams)

Code:

<item>  <title>  OPEN   PLEXUS HISTORY  PLAYED ACESTREAMS) </title>
<link>$doregex[plex]</link>
<regex>
<name>plex</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('XBMC.ActivateWindow(10001,"plugin://program.plexus/?iconimage=%2fstorage%2femulated%2f0%2fAndroid%2fdata%2forg.xbmc.kodi%2ffiles%2f.kodi%2faddons%2fprogram.plexus%2fresources%2fart%2fhistory.png&mode=8&name=%5bB%5dPlayed%20history%5b%2fB%5d&url=https%3a%2f%2fcode.google.com%2fp%2fp2p-strm%2f",return)')
]]></expres>
<page></page>
</regex>
</item>

u can erase or adapt the " ?iconimage" part ...

jujuuj
jujuuj

Messages : 261
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Playing with " executebuiltin " in £$π Empty Re: Playing with " executebuiltin " in £$π

Post by JonnyB on Thu 9 May - 0:07

Hi,

Thanks for the ideas, from these I got one I was searching for a time, refresh the current page:

Code:
<item> 
<title>Refresh</title>
<link>$doregex[refresh]</link>
<regex>
<name>refresh</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('Container.Refresh')
]]></expres>
<page></page>
<NOTPlayable>True</NOTPlayable>
</regex>
</item>

And try also the Quit command, works well.
Thanks

JonnyB

Messages : 21
Date d'inscription : 2017-04-18

View user profile

Back to top Go down

Playing with " executebuiltin " in £$π Empty Re: Playing with " executebuiltin " in £$π

Post by Jason on Wed 3 Jul - 20:44

Hi jujuuj,

the Thread is very Interesting Great Idea

It's possible with such Codes to show Wallpaper in Kodi? That would be Fascinating and Great


thx
Jason

Jason

Messages : 23
Date d'inscription : 2017-06-18

View user profile

Back to top Go down

Playing with " executebuiltin " in £$π Empty Re: Playing with " executebuiltin " in £$π

Post by jujuuj on Sat 27 Jul - 21:41

actually, i don't know ... and i have no time to visit or test all these possibilities

however, apparently, there is an activate window with a particular number for lots of situations,  the game is to find the info ... sometimes in code/pages of other kodi addons who also can call executebuiltin.

another thing u can do is
modificate the number  of 'activate window'

<item>
<title>OK  Favourites  executebuiltin </title>
<link>https://www.tvaddons.ag/forums/$doregex[id]</link>
<regex>
<name>id</name>
<expres>$pyFunction:xbmc.executebuiltin('ActivateWindow(10134)')</expres>
<page></page>
<NOTPlayable>True</NOTPlayable>
</regex>
</item>

many of these number will open or do something different !

but i cant say what ... LOL


If someone do that, please share the interesting working numbers ...
jujuuj
jujuuj

Messages : 261
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Playing with " executebuiltin " in £$π Empty Re: Playing with " executebuiltin " in £$π

Post by jujuuj on Sat 27 Jul - 21:53


this is what i use / tested , personally :

Code:

<item><title> [color=undefined] RUN  [color=undefined]ACESTREAM MEDIA  [/color] [ ANDROID APP.[/color]       </title>
<link>$doregex[android]</link>
<regex>
<name>android</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('XBMC.StartAndroidActivity("org.acestream.media")')
]]></expres>
<page></page>
</regex>
</item>

******************


<item>  <title> [color=undefined] OPEN  [color=undefined]PLEXUS HISTORY  [/color]  ( PLAYED ACES )
###################################[/color]</title>
<link>$doregex[plex]</link>
<regex>
<name>plex</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('XBMC.ActivateWindow(10001,"plugin://program.plexus/?iconimage=%2fstorage%2femulated%2f0%2fAndroid%2fdata%2forg.xbmc.kodi%2ffiles%2f.kodi%2faddons%2fprogram.plexus%2fresources%2fart%2fhistory.png&mode=8&name=%5bB%5dPlayed%20history%5b%2fB%5d&url=https%3a%2f%2fcode.google.com%2fp%2fp2p-strm%2f",return)')
]]></expres>
<page></page>
</regex>
</item>

******************************

<item> <title>$doregex[son] </title>  # wickedwickedwicked
<thumbnail>http://www.transparenttextures.com/patterns/asfalt-light.png</thumbnail>
<link>NA</link>
<regex>
<name>son</name>      
<expres><![CDATA[#$pyFunction
import xbmc
def GetLSProData(page_data,Cookie_Jar,m):
  xbmc.executebuiltin('PlayMedia("https://chomikuj.pl/Audio.ashx?id=3078301625&type=2&tp=mp3",1)') # wickedwickedwicked
  return ' '
]]></expres>
<page></page>
</regex>    
</item>

************************************



<item>
<title> executebuiltin SHOW Android appS   </title>
<link>$doregex[exebuilt]</link>
<regex>
<name>exebuilt</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('ActivateWindow(10001,"androidapp://sources/apps/",return)')
]]></expres>
<page></page>
</regex>
</item>
 
 ****************************



<item>
<title>Android : APK  File.Explorer.wifi.PRO  (APTOIDE)   "com.sandalgroup.fileexplorerwifipro"</title>
<link>$doregex[android]</link>
<regex>
<name>android</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('XBMC.StartAndroidActivity("com.sandalgroup.fileexplorerwifipro")')
 #return ''
]]></expres>
<page></page>
</regex>
</item>





<item>
<title>Android : APK  WiFi.File.Explorer  </title>
<link>$doregex[android]</link>
<regex>
<name>android</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('XBMC.StartAndroidActivity("com.dooblou.WiFiFileExplorer")')
 #return ''
]]></expres>
<page></page>
</regex>
</item>






<item>
<title>Android : APK  Smart.Youtube.tv  (APTOIDE)  </title>
<link>$doregex[android]</link>
<regex>
<name>android</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('XBMC.StartAndroidActivity("com.firsthash.smartyoutubetv2")')
 #return ''
]]></expres>
<page></page>
</regex>
</item>






<item>
<title>Android : APK  Youtube.tv</title>
<link>$doregex[android]</link>
<regex>
<name>android</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('XBMC.StartAndroidActivity("com.google.android.youtube.tv")')
 #return ''
]]></expres>
<page></page>
</regex>
</item>




 
 
 
 
 <item>
<title> executebuiltin('fbox.replay   </title>
<link>$doregex[exebuilt]</link>
<regex>
<name>exebuilt</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('StartAndroidActivity("fr.freebox.catchupstore")')
]]></expres><page></page></regex></item>
 
 

 
 
 
 
 <item>
<title> executebuiltin('fbox.tv   </title>
<link>$doregex[exebuilt]</link>
<regex>
<name>exebuilt</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('StartAndroidActivity("fr.freebox.tv")')
]]></expres><page></page></regex></item>

 
 


<item>
<title>Android : APK  Tele.7.jours</title>
<link>$doregex[android]</link>
<regex>
<name>android</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('XBMC.StartAndroidActivity("com.ldf.tele7.view")')
 #return ''
]]></expres>
<page></page>
</regex>
</item>






 <item>
<title>Android : APK  "lex Web.browser"</title>
<link>$doregex[android]</link>
<regex>
<name>android</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin('XBMC.StartAndroidActivity("lex.com.webbrowser")')
  ]]></expres>
<page></page>
</regex>
</item>

StartAndroidActivity(package,[intent,dataType,dataURI]) Launch an Android native app with the given package name.
Optional parms (in order): intent, dataType, dataURI. example: StartAndroidActivity(com.android.chrome,android.intent.action.VIEW,,http://kodi.tv/)

********************************




<item>
<title>OK  Favourites   executebuiltin </title>
<link>$doregex[id]</link>
<regex>
<name>id</name>
<expres>$pyFunction:xbmc.executebuiltin('ActivateWindow(10134)')</expres>
<page></page>
<NOTPlayable>True</NOTPlayable>
</regex>
</item>




 <item>
<title>OK  system-settings  executebuiltin("ActivateWindow(systemsettings)")</title>
<link>$doregex[exebuilt]</link>
<regex>
<name>exebuilt</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin("ActivateWindow(systemsettings)")
]]></expres>
<page></page>
</regex>
</item>



 <item>
<title>OK  Kodi Home   executebuiltin("ActivateWindow(0)")</title>
<link>$doregex[exebuilt]</link>
<regex>
<name>exebuilt</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin("ActivateWindow(0)")
]]></expres>
<page></page>
</regex>
</item>




 <item>
<title>OK  Kodi Home   executebuiltin("ActivateWindow(Home)")</title>
<link>$doregex[exebuilt]</link>
<regex>
<name>exebuilt</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc
 xbmc.executebuiltin("ActivateWindow(Home)")
]]></expres>
<page></page>
</regex>
</item>


*****************************************



 <item>
<title>OK not returning any error !   but interrupted after 20secs  
 EXEC : SOUND 0 ,1t   time  .sleep NOTPlayable </title>
<link>$doregex[exebuilt]</link>
<regex>
<name>exebuilt</name>
<expres><![CDATA[#$pyFunction
def GetLSProData(page_data,Cookie_Jar,m):
 import xbmc, time
 xbmc.executebuiltin('PlayMedia("http://lyd.nrk.no/nrk_radio_p1_ostlandssendingen_mp3_h",1)')
 time.sleep( 20 )
]]></expres>
<page></page>
<NOTPlayable>True</NOTPlayable>
</regex>
</item>


 
 
<!--

xbmc.executebuiltin('XBMC.PlayMedia("http://lyd.nrk.no/nrk_radio_p1_ostlandssendingen_mp3_h",1)')
while (xbmc.Player().isPlayingVideo() == True) and (not xbmc.abortRequested):
   time.sleep( 5 )
xbmc.executebuiltin('XBMC.Notification(sound over,continuing ..!,5000)')  





import xbmc
import time
import random
import os
import fileinput
time.sleep(1.5)
#list = os.listdir( Music_Path )
#xbmc.executebuiltin( 'PlayMedia(' + Music_Path + '/' + random.choice(list) + ')' )
list = os.listdir( Music_Path )
xbmc.executebuiltin( 'PlayMedia(' + Music_Path + random.choice(list) + ')' )




Autoexec.py
# Put this into the userdata folder, see http://wiki.xbmc.org/index.php?title=Userdata for details where this is for each platform
import xbmc
xbmc.executebuiltin('xbmc.PlayMedia("/storage/videos/","isdir")')
xbmc.executebuiltin('xbmc.PlayerControl(repeatall)')
xbmc.executebuiltin("Action(Fullscreen)")



AudioDelayMinus Decrease the delay amount of audio (use if audio is being heard too early)
AudioDelayPlus Increase the delay amount of audio (use if audio is being heard too late)

Play Play the selected item (or folder of items). Note: You may want to use playpause instead of just "play", since it will no longer pause media already being played.
PlayPause Play the selected item (or folder of items). Will also pause media when something is already playing.
Delete Used in My Files to delete a file.



 
import xbmc
import time

def PlayAndWait(mediafile):
 xbmc.executebuiltin("PlayMedia(%s)" % mediafile, True)
 while xbmc.Player().isPlaying():
   time.sleep(1.0)

PlayAndWait("/mnt/usb/video1.mp4")
xbmc.executebuiltin("SlideShow(/mnt/usb/slideshow)")
 
 
 
import xbmc, time
xbmc.executebuiltin( "PlayMedia(/mnt/usb/video1.mp4)" )
time.sleep(20)
xbmc.executebuiltin( "SlideShow(/mnt/usb/slideshow)" )  
 

 
 executebuiltin("ActivateWindow(systemsettings)").
 
 import xbmc
xbmc.executebuiltin("PlayMedia(/storage/.kodi/userdata/playlists/music/radio.m3u)")
xbmc.executebuiltin("PlayerControl(Random)")
 
 
   The % operator is used for string formatting. %s is a format specification for a string variable, the value of which is specified after the % so:
xbmc.executebuiltin("PlayMedia(%s)" % mediafile, True)
   is saying replace %s with the value of mediafile.


https://kodi.wiki/view/Built-in_scripting  
Using Built-in Functions from python

To run a built-in Kodi function from within a python script, you just need to call executebuiltin() with the function name. For example,

xbmc.executebuiltin('XBMC.RunScript(Q:\Scripts\myscript.py)')

will run the script myscript.py located in the Scripts directory. On 28.11.2011 a optional parameter was added. Normal call will be non-blocking - so it returns before the extraction has been finished. Now it's possible to call built-in functions blocking by doing:

xbmc.executebuiltin('XBMC.RunScript(Q:\Scripts\myscript.py)', True)

 

 
lien £$π        
   xbmc.executebuiltin('ActivateWindow(10502,"plugin://plugin.video.live.streamspro/?      
 
lien F4µ  
   xbmc.executebuiltin('PlayMedia("plugin://plugin.video.live.streamspro/?url=plugin%3A%2F%2Fplugin.video.f4mTester%2F%3    
 
 -->

   
jujuuj
jujuuj

Messages : 261
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Playing with " executebuiltin " in £$π Empty Re: Playing with " executebuiltin " in £$π

Post by jujuuj on Sat 27 Jul - 21:56


if u want my opinion, this is just the beggining ... and there are plenty of possibilties to explore,

however it's not so easy to find info about that...

a good spy is your favourites.xml file, once u put the link in fav you can copy it in an item executebuiltin(...)
jujuuj
jujuuj

Messages : 261
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Playing with " executebuiltin " in £$π Empty Re: Playing with " executebuiltin " in £$π

Post by JonnyB on Sun 28 Jul - 12:00

Hi,

There is some info in here:

https://kodi.wiki/view/Window_IDs

JonnyB

Messages : 21
Date d'inscription : 2017-04-18

View user profile

Back to top Go down

Playing with " executebuiltin " in £$π Empty Re: Playing with " executebuiltin " in £$π

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum