fix: use HA /data for addon storage, remove data_folder config option

/data is HA's built-in private persistent storage for every addon - no
user configuration needed. Only download_folder needs to be user-facing
since that's where the music lives and users need to know the path.
This commit is contained in:
petruknw
2026-05-20 23:20:44 +10:00
parent 9d1d2dc72e
commit c833761e2d
2 changed files with 7 additions and 11 deletions

View File

@@ -31,12 +31,9 @@ map:
options:
download_folder: /share/aurral/downloads
data_folder: /share/aurral/data
schema:
download_folder: str
data_folder: str
port: int?
panel_icon: mdi:music-box-multiple
panel_title: Aurral

View File

@@ -4,19 +4,18 @@
# ==============================================================
DOWNLOAD_FOLDER=$(bashio::config 'download_folder')
DATA_FOLDER=$(bashio::config 'data_folder')
# Ensure host-side directories exist
mkdir -p "${DOWNLOAD_FOLDER}" "${DATA_FOLDER}"
# Ensure host-side download directory exists
mkdir -p "${DOWNLOAD_FOLDER}"
bashio::log.info "Starting Aurral"
bashio::log.info " Data : ${DATA_FOLDER}"
bashio::log.info " Data : /data (HA persistent storage)"
bashio::log.info " Downloads : ${DOWNLOAD_FOLDER}"
# Use Aurral's native env vars to redirect paths to HA share locations.
# This avoids symlinks into host-mounted paths which the upstream
# docker-entrypoint.sh cannot chown (Operation not permitted).
export AURRAL_DATA_DIR="${DATA_FOLDER}"
# /data is HA's private persistent storage, automatically mounted per-addon.
# AURRAL_DATA_DIR redirects Aurral's database/config there.
# DOWNLOAD_FOLDER is user-configured and points to /share.
export AURRAL_DATA_DIR="/data"
export DOWNLOAD_FOLDER="${DOWNLOAD_FOLDER}"
export WEEKLY_FLOW_FOLDER="${DOWNLOAD_FOLDER}/weekly-flow"