Example #1
0
func getSearchers() []interface{} {
	list := make([]interface{}, 0)
	for _, addon := range xbmc.GetAddons("xbmc.python.script", "executable", true).Addons {
		if strings.HasPrefix(addon.ID, "script.quasar.") {
			list = append(list, NewAddonSearcher(addon.ID))
		}
	}
	return list
}
Example #2
0
func getProviders() []Addon {
	list := make([]Addon, 0)
	for _, addon := range xbmc.GetAddons("xbmc.python.script", "executable", "all", []string{"name", "version", "enabled"}).Addons {
		if strings.HasPrefix(addon.ID, "script.quasar.") {
			list = append(list, Addon{
				ID:      addon.ID,
				Name:    addon.Name,
				Version: addon.Version,
				Enabled: addon.Enabled,
				Status:  xbmc.AddonCheck(addon.ID),
			})
		}
	}
	sort.Sort(ByStatus(list))
	sort.Sort(ByEnabled(list))
	return list
}