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"> <extension point="xbmc.python.pluginsource" library="default.py">
<provides>video</provides> <provides>video</provides>
</extension> </extension>
<extension point="xbmc.service" <extension point="xbmc.service" library="service.py">
library="service.py">
</extension> </extension>
<extension point="xbmc.addon.metadata"> <extension point="xbmc.addon.metadata">
<summary>Play BluRays from XBMC with MakeMKV</summary> <summary>Play BluRays from XBMC with MakeMKV</summary>

View file

@ -1,10 +1,6 @@
import xbmc, xbmcgui, subprocess, os, time, sys, urllib, re import xbmc, xbmcgui, subprocess, os, time, sys, urllib, re
import xbmcplugin, xbmcaddon 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" __scriptname__ = "MakeMKV BluRay Watch Plugin"
__scriptID__ = "plugin.makemkvbluray" __scriptID__ = "plugin.makemkvbluray"
@ -14,6 +10,10 @@ __credits__ = ""
__version__ = "0.1" __version__ = "0.1"
__addon__ = xbmcaddon.Addon(__scriptID__) __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 __language__ = __addon__.getLocalizedString
_ = sys.modules[ "__main__" ].__language__ _ = sys.modules[ "__main__" ].__language__