Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions lib/addons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ function bashio::addon.uninstall() {
# $1 Add-on slug (optional, default: self)
# ------------------------------------------------------------------------------
function bashio::addon.update() {
local slug=${1:-$(bashio::addon.slug)}
local slug=${1:-'self'}
# This call is redirected to the store, and store doesn't support 'self'
if bashio::var.equals "${slug}" 'self'; then
slug=$(bashio::addon.slug)
fi
bashio::log.trace "${FUNCNAME[0]}"
bashio::api.supervisor POST "/store/addons/${slug}/update"
bashio::cache.flush_all
Expand All @@ -122,8 +126,11 @@ function bashio::addon.logs() {
# $1 Add-on slug (optional, default: self)
# ------------------------------------------------------------------------------
function bashio::addon.documentation() {
local slug=${1:-'self'}
# This call is redirected to the store, and store doesn't support 'self'
local slug=${1:-$(bashio::addon.slug)}
if bashio::var.equals "${slug}" 'self'; then
slug=$(bashio::addon.slug)
fi
bashio::log.trace "${FUNCNAME[0]}"
bashio::api.supervisor GET "/addons/${slug}/documentation" true
}
Expand All @@ -135,8 +142,11 @@ function bashio::addon.documentation() {
# $1 Add-on slug (optional, default: self)
# ------------------------------------------------------------------------------
function bashio::addon.changelog() {
local slug=${1:-'self'}
# This call is redirected to the store, and store doesn't support 'self'
local slug=${1:-$(bashio::addon.slug)}
if bashio::var.equals "${slug}" 'self'; then
slug=$(bashio::addon.slug)
fi
bashio::log.trace "${FUNCNAME[0]}"
bashio::api.supervisor GET "/addons/${slug}/changelog" true
}
Expand Down
Loading