def getTargetUrl(self, action=None, extra=None): """Returns the url for this item to use by XBMC @param action: optional action to add to the url""" # # this needs to be removed... ugly hack to force calling getListItem() before this is called # as getListItem() will change the state of this object by setting the imdbid # this should be refactored out... # if not self.__listItem: self.getListItem() extra = extra or self.extraArgs if self.mode: argsMap = { "url": self.url, "mode": str(self.mode), "label": self.label, "name": self.label } if action: argsMap['action'] = action if extra: for key, value in extra.iteritems(): argsMap[key] = value if self.imdbid: argsMap['imdbid'] = self.imdbid return pluginsupport.encode(argsMap) return self.url
def getTargetUrl(self, action=None, extra=None): """Returns the url for this item to use by XBMC @param action: optional action to add to the url""" extra = extra or self.extraArgs if self.mode: argsMap = {"url": self.url, "mode": str(self.mode), "label": self.label, "name": self.label} if action: argsMap['action'] = action if extra: for key, value in extra.iteritems(): argsMap[key] = value return pluginsupport.encode(argsMap) return self.url
def getTargetUrl(self, action=None, extra=None): """Returns the url for this item to use by XBMC @param action: optional action to add to the url""" # # this needs to be removed... ugly hack to force calling getListItem() before this is called # as getListItem() will change the state of this object by setting the imdbid # this should be refactored out... # if not self.__listItem: self.getListItem() extra = extra or self.extraArgs if self.mode: argsMap = {"url": self.url, "mode": str(self.mode), "label": self.label, "name": self.label} if action: argsMap['action'] = action if extra: for key, value in extra.iteritems(): argsMap[key] = value if self.imdbid: argsMap['imdbid'] = self.imdbid return pluginsupport.encode(argsMap) return self.url