Notice to addon devs
#46
(2014-02-22, 23:13)jmarshall Wrote: It's not on demand. If you import it then you need to specify it as a dependency regardless of platform.

If it's not needed on one platform but is needed on another then there's a completely different problem to solve.

Could you explain what the "optional" tag is actually doing then? According the wiki: "This will only install the dependency when the add-on actually needs it"

Just trying to figure out when this would actually be useful. Thanks.
Reply
#47
Add-ons are only ever installed either as a required dependency, or as an optional dependency where the existing version is too low, or when the user initiates the install of an add-on.

They're never installed "on demand" or anything like that.

The optional dependency is to specify that the add-on will make use of it if it's there, but won't freak out if it isn't. i.e. it's up to the user to install that optional dependency, rather than the add-on author.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#48
(2014-02-24, 06:24)jmarshall Wrote: They're never installed "on demand" or anything like that.

Just want to add that plugin add-ons can indeed be installed on demand, but only for playback.
If plugin A returns a playable URL like "plugin://plugin.video.add-on-b" and "plugin.video.add-on-b" is not installed but available through any installed repository the User will see a dialog like "Plugin B is not installed, do you want to install?"

Of course this also works on playback, not if plugin A tries to import or use any code from plugin B.
My GitHub. My Add-ons:
Image
Reply
#49
Yup, that's true - there's specific code for installing plugins, forgot about that.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#50
Thanks. I see the difference now, just didn't want to try using it myself one day and not get the results I expected. Sounds like the use of this would really be an edge case in most situations.
Reply
#51
(2013-09-19, 22:44)Martijn Wrote: 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.
After porting to this module, I have to say: it's not that simple. There's major api differences. I managed to rewrite to a different set of api just fine but there might be feature differences here, I dunno..
Reply
#52
This issue of the standard player for mp4 audio still persists. Sad
Reply
#53
Really? It worked for me. I am fetching mp4 files that are incorrectly served as audio/mpeg (containing AAC audio) and were thus being handled by the paplayer instead of the dvdplayer. Now I explicitly set the mime type and XBMC uses the correct player when my player instance is set to AUTO. Here's my plugin code, returning a setResolvedUrl:

Code:
import xbmcgui
import xbmcplugin
import cgi
import urllib2
import json

def get_it(args):

  def parse_query(query):
    queries = cgi.parse_qs(query)
    q = {}
    for key, value in queries.items():
        q[key] = value[0]
    return q

  plugin_url = args[0]
  plugin_handle = int(args[1])
  plugin_queries = parse_query(args[2][1:])

  try:
    track = plugin_queries['track']
  except:
    pass

  def __get_data(req, timeout):
    succeed = 0
    while succeed < 1:
      try:
        response = urllib2.urlopen(req, timeout=timeout)
        try:
          results = json.load(response)
          return results
        except:
          return True
      except urllib2.HTTPError, e:
        print "------------------  Bad server response ----------------"
        print e.headers
        print e
        succeed += 1
      except urllib2.URLError, e:
        print 'We failed to reach a server.'
        print 'Reason: ', e.reason
        succeed += 1
    return False


  def get_playable_url(track_id):
    url = "http://localhost:8090/?track=%s" % (track_id)
    req = urllib2.Request(url)
    results = __get_data(req, 10)
    if not results:
      return False
    else:
      return str(results[0]['url'])


  try:
    url = get_playable_url(track)
    item = xbmcgui.ListItem(path=url)
    item.setProperty('mimetype','audio/mp4')
    xbmcplugin.setResolvedUrl(int(args[1]), True, item)
  except:
    pass




(2014-01-19, 09:28)rivy Wrote: @Bstrdsmkr,

I tried:

PHP Code:
item.setProperty('mimetype''audio/mp4')
xbmc.Player().playurlitem 

... without success. Again, I receive a codec error:
Quote:ERROR: CAudioDecoder: Unable to Init Codec ...
Reply
#54
Question 
hey there new here im been trying to make a addon for while now i can some time get addon to work then not still dont show anythin in addon need help how to make full plugin.video
Reply
#55
zorder / render order of addon dialogs fixed

In the past we've had some issues with the layering of dialogs, especially when you open an addon dialog from within a core dialog (e.g. addon info dialog).
It happens that the newly opended addon dialog will be ordered underneath the core dialogs. Those issues should now belong to the past.

Please remove any and all <zorder> definitions from your custom skin xml's (unless they are really really needed) or workarounds (e.g. Dialog.Close(all,true) ) as they are now likely to cause more probs then do good.

This is backported and also fixed in 15.x Isengard

Should you still notice any issues, please file an issue on our bugtracker http://trac.kodi.tv
Reply
#56
Hi all,

Could you please update the dependency versions for next plugin updates according to
http://kodi.wiki/view/Addon.xml#Dependency_versions
Till now I didn't really look at the minimum python version was specified to match the Kodi version since usually from 2.1.0 would just work fine in any Kodi version. So from now if you could set the minimum version to match the repo you are updating to that would be great.

Nothing has changed regarding add-ons inclusion to each Kodi version. If you submit your add-on update to Gotham it will still be available up to the latest version where we still have backwards compatibility set to Gotham. In case of Jarvis this is still python API 2.1.0 for example.
This may change in the future version of Kodi where will slowly start to raise the minimum versions as several changes in the API have been done that will slowly break certain API features.

As a request. Should you stop maintaining an add-on could you please let us know so we can set it "broken" to prevent users from installing 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

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