From d7a71c0186ca91ab693407472c882d9b53649335 Mon Sep 17 00:00:00 2001 From: Giovanni Fulco Date: Thu, 6 Feb 2025 19:34:38 +0100 Subject: [PATCH] #453 Add support for some new tidal configuration parameters (#454) * #453 Add support for new tidal configuration variables * #453 Update release notes --- Dockerfile | 3 +++ README.md | 3 +++ app/bin/run-upmpdcli.sh | 27 +++++++++++++++++++++++++++ doc/change-history.md | 1 + 4 files changed, 34 insertions(+) diff --git a/Dockerfile b/Dockerfile index 522c171..12ec54c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -175,6 +175,9 @@ ENV TIDAL_DOWNLOAD_PLUGIN="" ENV TIDAL_PLUGIN_BRANCH="" ENV TIDAL_FORCE_TIDALAPI_VERSION="" ENV TIDAL_ENABLE_IMAGE_CACHING="" +ENV TIDAL_ALLOW_FAVORITE_ACTIONS="" +ENV TIDAL_ALLOW_BOOKMARK_ACTIONS="" +ENV TIDAL_ALLOW_STATISTICS_ACTIONS="" ENV RADIO_PARADISE_ENABLE="" ENV RADIO_PARADISE_DOWNLOAD_PLUGIN="" diff --git a/README.md b/README.md index 6e8d2d7..3aceae1 100644 --- a/README.md +++ b/README.md @@ -262,6 +262,9 @@ TIDAL_DOWNLOAD_PLUGIN|If set to `YES`, the updated plugin is downloaded from the TIDAL_PLUGIN_BRANCH|If `TIDAL_DOWNLOAD_PLUGIN`, the branch indicated by this variable will be used. Must be specified if enabling `TIDAL_DOWNLOAD_PLUGIN`. Suggested branch name is `latest-tidal` TIDAL_FORCE_TIDALAPI_VERSION|If set, the specified version of tidalapi will be installed over the one included in the image. See note below. TIDAL_ENABLE_IMAGE_CACHING|If set to `yes`, you can enable caching of album and artist images. This can consume some disk space, so the default is `no`. +TIDAL_ALLOW_FAVORITE_ACTIONS|Allow the creation of entries that can manipulate the favorites +TIDAL_ALLOW_BOOKMARK_ACTIONS|Allow the creation of entries that can manipulate the bookmarks (local favorites) +TIDAL_ALLOW_STATISTICS_ACTIONS|Allow the creation of entries that can remove entries from the playback statistics QOBUZ_ENABLE|Set to `yes` to enable Qobuz support, defaults to `no` QOBUZ_TITLE|Set the title for Qobuz plugin, defaults to `Qobuz` QOBUZ_USERNAME|Your Qobuz account username diff --git a/app/bin/run-upmpdcli.sh b/app/bin/run-upmpdcli.sh index b1649b9..02381d9 100644 --- a/app/bin/run-upmpdcli.sh +++ b/app/bin/run-upmpdcli.sh @@ -608,6 +608,33 @@ if [[ "${TIDAL_ENABLE^^}" == "YES" ]]; then exit 3 fi fi + # favorite actions + if [[ -n "${TIDAL_ALLOW_FAVORITE_ACTIONS}" ]]; then + if [[ "${TIDAL_ALLOW_FAVORITE_ACTIONS^^}" == "YES" || "${TIDAL_ALLOW_FAVORITE_ACTIONS^^}" == "Y" ]]; then + echo "tidalallowfavoriteactions = 1" >> $CONFIG_FILE + elif [[ "${TIDAL_ALLOW_FAVORITE_ACTIONS^^}" != "NO" && "${TIDAL_ALLOW_FAVORITE_ACTIONS^^}" == "N" ]]; then + echo "Invalid TIDAL_ALLOW_FAVORITE_ACTIONS=[${TIDAL_ALLOW_FAVORITE_ACTIONS}]" + exit 3 + fi + fi + # booknark actions + if [[ -n "${TIDAL_ALLOW_BOOKMARK_ACTIONS}" ]]; then + if [[ "${TIDAL_ALLOW_BOOKMARK_ACTIONS^^}" == "YES" || "${TIDAL_ALLOW_BOOKMARK_ACTIONS^^}" == "Y" ]]; then + echo "tidalallowbookmarkactions = 1" >> $CONFIG_FILE + elif [[ "${TIDAL_ALLOW_BOOKMARK_ACTIONS^^}" != "NO" && "${TIDAL_ALLOW_BOOKMARK_ACTIONS^^}" == "N" ]]; then + echo "Invalid TIDAL_ALLOW_BOOKMARK_ACTIONS=[${TIDAL_ALLOW_BOOKMARK_ACTIONS}]" + exit 3 + fi + fi + # favorite actions + if [[ -n "${TIDAL_ALLOW_STATISTICS_ACTIONS}" ]]; then + if [[ "${TIDAL_ALLOW_STATISTICS_ACTIONS^^}" == "YES" || "${TIDAL_ALLOW_STATISTICS_ACTIONS^^}" == "Y" ]]; then + echo "tidalallowstatisticsactions = 1" >> $CONFIG_FILE + elif [[ "${TIDAL_ALLOW_STATISTICS_ACTIONS^^}" != "NO" && "${TIDAL_ALLOW_STATISTICS_ACTIONS^^}" == "N" ]]; then + echo "Invalid TIDAL_ALLOW_STATISTICS_ACTIONS=[${TIDAL_ALLOW_STATISTICS_ACTIONS}]" + exit 3 + fi + fi fi echo "Qobuz Enable [$QOBUZ_ENABLE]" diff --git a/doc/change-history.md b/doc/change-history.md index d172bce..c2f31d9 100644 --- a/doc/change-history.md +++ b/doc/change-history.md @@ -2,6 +2,7 @@ Change Date|Major Changes ---|--- +2025-02-06|Add support for some new tidal configuration variables (see issue [#453](https://github.com/GioF71/upmpdcli-docker/issues/453)) 2024-11-22|Build with version 1.9.0, adapt documentation (see issue [#448](https://github.com/GioF71/upmpdcli-docker/issues/448)) 2024-10-29|Add support for tidal image caching (see issue [#446](https://github.com/GioF71/upmpdcli-docker/issues/446)) 2024-10-28|Add support for forcing the tidalapi version (`TIDAL_FORCE_TIDALAPI_VERSION`) (see issue [#444](https://github.com/GioF71/upmpdcli-docker/issues/444))