Get the addon path correctly

This commit is contained in:
Arne Bultman 2012-01-06 19:30:11 +01:00
parent 0b8957b4cb
commit d9100407b2
2 changed files with 5 additions and 6 deletions

View File

@ -7,8 +7,7 @@
<extension point="xbmc.python.pluginsource" library="default.py">
<provides>video</provides>
</extension>
<extension point="xbmc.service"
library="service.py">
<extension point="xbmc.service" library="service.py">
</extension>
<extension point="xbmc.addon.metadata">
<summary>Play BluRays from XBMC with MakeMKV</summary>

View File

@ -1,10 +1,6 @@
import xbmc, xbmcgui, subprocess, os, time, sys, urllib, re
import xbmcplugin, xbmcaddon
# Shared resources
BASE_RESOURCE_PATH = os.path.join( xbmcaddon.Addon().getAddonInfo('path'), "resources" )
sys.path.append( os.path.join( BASE_RESOURCE_PATH, "lib" ) )
__scriptname__ = "MakeMKV BluRay Watch Plugin"
__scriptID__ = "plugin.makemkvbluray"
@ -14,6 +10,10 @@ __credits__ = ""
__version__ = "0.1"
__addon__ = xbmcaddon.Addon(__scriptID__)
# Shared resources
BASE_RESOURCE_PATH = os.path.join( __addon__.getAddonInfo('path'), "resources" )
sys.path.append( os.path.join( BASE_RESOURCE_PATH, "lib" ) )
__language__ = __addon__.getLocalizedString
_ = sys.modules[ "__main__" ].__language__