--- a/src/cdplugins/gmusic/gmusic-app.py
+++ b/src/cdplugins/gmusic/gmusic-app.py
@@ -105,22 +105,6 @@
return {'media_url' : media_url, 'mimetype' : mime, 'kbs' : kbs}
-# Bogus global for helping with reusing kodi addon code
-class XbmcPlugin:
- SORT_METHOD_TRACKNUM = 1
- def __init__(self):
- self.entries = []
- self.objid = ''
- def addDirectoryItem(self, hdl, endpoint, title, isend):
- self.entries.append(direntry('0$gmusic$' + endpoint, self.objid, title))
- return
- def endOfDirectory(self, h):
- return
- def setContent(self, a, b):
- return
- def addSortMethod(self, a, b):
- return
-
def add_directory(title, endpoint):
if callable(endpoint):
endpoint = plugin.url_for(endpoint)
@@ -128,7 +112,6 @@
xbmcplugin.objid, title))
def urls_from_id(view_func, items):
- #msgproc.log("urls_from_id: items: %s" % str([item.id for item in items]))
return [plugin.url_for(view_func, item.id) for item in items
if str(item.id).find('http') != 0]
@@ -155,7 +138,7 @@
@dispatcher.record('browse')
def browse(a):
global xbmcplugin
- xbmcplugin = XbmcPlugin()
+ xbmcplugin = XbmcPlugin('0$gmusic$')
msgproc.log("browse: [%s]" % a)
if 'objid' not in a:
raise Exception("No objid in args")