fix #60
This commit is contained in:
parent
4d944396b8
commit
9acc47cc76
|
@ -18,8 +18,6 @@ addon = xbmcaddon.Addon()
|
|||
addon_base_path = xbmc.translatePath(addon.getAddonInfo('profile')).decode('utf-8')
|
||||
xbmcplugin.setContent(addon_handle, "files")
|
||||
|
||||
os.environ['LD_LIBRARY_PATH'] = "/usr/lib:/lib:" + addon.getAddonInfo("path") + "/lib"
|
||||
|
||||
def build_url(query):
|
||||
return base_url + "?" + urllib.urlencode(query)
|
||||
|
||||
|
|
|
@ -46,10 +46,17 @@ class _HTTP_DATA(ctypes.Structure):
|
|||
_fields_ = [("memory", ctypes.POINTER(ctypes.c_ubyte)),
|
||||
("size", ctypes.c_size_t)]
|
||||
|
||||
def findlib(name):
|
||||
libdirs = os.environ['LD_LIBRARY_PATH'].split(':')
|
||||
for dir in libdirs:
|
||||
for file in os.listdir(dir):
|
||||
if file.find(name) != -1:
|
||||
return os.path.join(dir, file)
|
||||
|
||||
class LibGameStream:
|
||||
def __init__(self, libpath = ""):
|
||||
self.commonlib = ctypes.cdll.LoadLibrary(os.path.join(libpath, "libmoonlight-common.so.2"))
|
||||
self.gslib = ctypes.cdll.LoadLibrary(os.path.join(libpath, "libgamestream.so.2"))
|
||||
self.commonlib = ctypes.cdll.LoadLibrary(findlib("libmoonlight-common.so"))
|
||||
self.gslib = ctypes.cdll.LoadLibrary(findlib("libgamestream.so"))
|
||||
self.connected = False
|
||||
self.address = ""
|
||||
self.key_dir = ""
|
||||
|
|
Loading…
Reference in a new issue