Notice to addon devs
#1
Lightbulb 
script.module.elementtree

It seems that we are still using the script.module.elementtree however this is no longer needed since python version 2.5 and higher. Since XBMC uses python 2.6 or higher it is safe to use elementtree that has been included in python.

To use it simply include this (for example):
PHP Code:
import xml.etree.ElementTree as ET 

More information can be found here
http://docs.python.org/2/library/xml.etr...ttree.html

On next update it would be appreciated if you could replace the used module with the build in one.


script.module.simplejson
It seems that from python 2.7 and up the internal JSON lib is faster than the external script.module.simplejson that most of us use.
To test this out for yourself you can download script.json.performance-0.0.1.zip and try it out for yourself what the difference is.
Note: running the addon gives no indication during it's testing so have some patience until the dialog pops up.
Since some platforms use 2.6 you can use the following code to use the fastest method:
PHP Code:
if sys.version_info >=  (27):
    
import json as _json
else:
    
import simplejson as _json 



Tests done with JSON:
  • Windows: simplejson is 1.37x faster than json (python 2.6). No difference when using simpljeson version 2.0.10 and 3.3.0
  • Android: Android: simplejson is 1.41x faster than json (python 2.6). No difference when using simpljeson version 2.0.10 and 3.3.0
  • OpenELEC: json is 12.44x faster than simplejson (python 2.7). No difference when using simpljeson version 2.0.10 and 3.3.0
  • Ubuntu: json is 13.2x faster than simplejson (python 2.7). No difference when using simplejson version 2.0.10 and 3.3.0
  • iOS: untested
  • OSX: untested
  • rPi: untested

So all in all using simplejson doesn't seem like the obvious choice. So i would recommend every script dev to use the code posted in OP to use the fastest method.
results may differ per machine/test


Repo cleanup:
We are trying to keep things more tidy so once in a while we try to clean up broken addons or unmaintained ones.

Dharma:
If you have addons that are still in Dharma repo which should be marked broken or removed please contact us so we can take action. We will not allow any updates for them any more so only action is to remove or mark them broken.
Current list:
http://mirrors.xbmc.org/addons/dharma/

Eden:
If you have addons that are still in Eden repo which should be marked broken or removed please contact us so we can take action.
For Frodo we still allow updates so if you which you could also send an update. No new additions will be allowed.
Current list:
http://mirrors.xbmc.org/addons/eden/

Frodo:
We would like to request that you updated you plugin with the following: To be clear we will not remove them. We would just like to have a more consistent repository for future XBMC versions.
Current list: http://mirrors.xbmc.org/addons/frodo/


Remember that Eden and Frodo versions should differ regarding version number and xbmc.python version when submitted.

Thanks you.


Deprecate usage of explicitly setting the player in add-ons
We would like to ask when you update your plugin to no longer use the option for selection the internal player.
So instead of:
PHP Code:
xbmc.Player([core])
     *          - 
xbmc.PLAYER_CORE_AUTO
     
*          - xbmc.PLAYER_CORE_DVDPLAYER
     
*          - xbmc.PLAYER_CORE_MPLAYER
     
*          - xbmc.PLAYER_CORE_PAPLAYER 

just use:
PHP Code:
xbmc.Player() 
XBMC will auto select the player it needs.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#2
Didn't know of this, thanks!

Is there a plan to remove script.module.elementtree from the xbmc repo?
Reply
#3
(2013-09-19, 22:57)Eldorado Wrote: Didn't know of this, thanks!

Is there a plan to remove script.module.elementtree from the xbmc repo?

not really Smile
to many addons rely on it. just thought i'd mention and might as well change it if we update our addons
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#4
Also added some information about simplejson module. if possible let us know the results if you test it
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#5
Tests done with JSON:
  • Windows: simplejson is 1.37x faster than json (python 2.6). No difference when using simpljeson version 2.0.10 and 3.3.0
  • Android: Android: simplejson is 1.41x faster than json (python 2.6). No difference when using simpljeson version 2.0.10 and 3.3.0
  • OpenELEC: json is 12.44x faster than simplejson (python 2.7). No difference when using simpljeson version 2.0.10 and 3.3.0
  • Ubuntu: json is 13.2x faster than simplejson (python 2.7). No difference when using simplejson version 2.0.10 and 3.3.0
  • iOS: untested
  • OSX: untested
  • rPi: untested

So all in all using simplejson doesn't seem like the obvious choice. So i would recommend every script dev to use the code posted in OP to use the fastest method.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#6
Repo cleanup:
We are trying to keep things more tidy so once in a while we try to clean up broken addons or unmaintained ones.

Dharma:
If you have addons that are still in Dharma repo which should be marked broken or removed please contact us so we can take action. We will not allow any updates for them any more so only action is to remove or mark them broken.
Current list:
http://mirrors.xbmc.org/addons/dharma/

Eden:
If you have addons that are still in Eden repo which should be marked broken or removed please contact us so we can take action.
For Frodo we still allow updates so if you which you could also send an update. No new additions will be allowed.
Current list:
http://mirrors.xbmc.org/addons/eden/

Frodo:
We would like to request that you updated you plugin with the following: To be clear we will not remove them. We would just like to have a more consistent repository for future XBMC versions.
Current list: http://mirrors.xbmc.org/addons/frodo/


Remember that Eden and Frodo versions should differ regarding version number and xbmc.python version when submitted.

Thanks you.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#7
@Martijn

Any add-on's of mine in the Dharma repo should be considered unmaintained / likely broken.

Would you like for me to send a list?
Reply
#8
(2013-09-23, 16:21)divingmule Wrote: @Martijn

Any add-on's of mine in the Dharma repo should be considered unmaintained / likely broken.

Would you like for me to send a list?

send you mail with the list. thx
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#9
About required elements in addon.xml [http://wiki.xbmc.org/index.php?title=Add...nformation]

Really is mandatory a forum url !?
I ve not a forum, what msut I do? Create a thread in this forum and then use the thread link as url ?
Reply
#10
(2013-09-24, 20:43)realtebo Wrote: About required elements in addon.xml [http://wiki.xbmc.org/index.php?title=Add...nformation]

Really is mandatory a forum url !?
I ve not a forum, what msut I do? Create a thread in this forum and then use the thread link as url ?

just keep it empty Smile

<forum></forum>

same for the others in that section if you do not want to fill them in.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#11
Deprecate usage of explicitly setting the player in add-ons
We would like to ask when you update your plugin to no longer use the option for selection the internal player.
So instead of:
PHP Code:
xbmc.Player([core])
     *          - 
xbmc.PLAYER_CORE_AUTO
     
*          - xbmc.PLAYER_CORE_DVDPLAYER
     
*          - xbmc.PLAYER_CORE_MPLAYER
     
*          - xbmc.PLAYER_CORE_PAPLAYER 

just use:
PHP Code:
xbmc.Player() 
XBMC will auto select the player it needs.

Current list of addons that use this:
Quote:plugin.audio.listenliveeu
plugin.audio.modland
plugin.audio.qobuz
plugin.audio.radioma
plugin.audio.relive
plugin.video.4od
plugin.video.aljazeera
plugin.video.animeftw
plugin.video.goldpagemedia
plugin.video.irishtv
plugin.video.medi1tv
plugin.video.offene_kanaele
plugin.video.orftvthek
plugin.video.pakee
plugin.video.previewnetworks
plugin.video.sarpur
plugin.video.tvvn
plugin.video.vine
plugin.video.visir
plugin.video.wdrrockpalast
script.cu.lrclyrics
script.cu.lyrics
script.lrclyrics
script.module.playbackengine
script.mpdc
script.njoy
script.xbmc-pbx-addon
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#12
Do not use os.getcwd()
There are still some addons that are using
PHP Code:
os.getcwd() 
Please update your plugins with
PHP Code:
xbmc.translatePath(xbmcaddon.Addon.getAddonInfo('path')).decode('utf-8'

This is the list of add-ons that are still using it:
Quote:plugin.image.500px
plugin.video.hockeystreams
plugin.video.nasa
plugin.video.previewnetworks
plugin.video.synopsi (used for testing outside XBMC: OK)
script.cinema.experience
script.games.rom.collection.browser
script.module.xbmcswift (used for testing outside XBMC: OK)
script.module.xbmcswift2 (used for testing outside XBMC: OK)
script.mythbox
service.watchdog (came with module, unused)
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#13
Do not use executehttpapi - it does not work since Frodo

PHP Code:
executehttpapi(httpcommand
Please update your script if you are still using this. It does not work anymore.

These are the ones still using it:
Quote:script.cdartmanager
script.cinema.experience
script.games.rom.collection.browser (got an exception to use it from me for now)
script.mythbox (code is commented out so no issue there)
plugin.video.pakee
plugin.video.previewnetworks
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#14
Is it ok to use it like this?

Code:
try:
    xbmc.executehttpapi("Action(199)")
except:
    xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Input.ExecuteAction","params":{"action":"togglefullscreen"},"id":"1"}')

I don't want to maintain a branch for each release, so I tried to be backward compatible.
Reply
#15
(2013-09-29, 18:20)malte Wrote: Is it ok to use it like this?

Code:
try:
    xbmc.executehttpapi("Action(199)")
except:
    xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Input.ExecuteAction","params":{"action":"togglefullscreen"},"id":"1"}')

I don't want to maintain a branch for each release, so I tried to be backward compatible.

I see you only use it twice. So imo it's ok for now. Do note that with current addon.xml you can't install it on Eden due to unmet dependency.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply

Logout Mark Read Team Forum Stats Members Help
Notice to addon devs3