From f752202bba547a3bbd5accae64a54ddcfda52a6d Mon Sep 17 00:00:00 2001 From: Giovanni Fulco Date: Tue, 29 Oct 2024 18:10:21 +0100 Subject: [PATCH] #446 Add support to tidal image caching (#447) --- Dockerfile | 1 + README.md | 3 ++- app/bin/run-upmpdcli.sh | 9 +++++++++ doc/change-history.md | 1 + 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ee49494..4ecf789 100644 --- a/Dockerfile +++ b/Dockerfile @@ -174,6 +174,7 @@ ENV TIDAL_PREPEND_NUMBER_IN_ITEM_LIST="" ENV TIDAL_DOWNLOAD_PLUGIN="" ENV TIDAL_PLUGIN_BRANCH="" ENV TIDAL_FORCE_TIDALAPI_VERSION="" +ENV TIDAL_ENABLE_IMAGE_CACHING="" ENV RADIO_PARADISE_ENABLE="" ENV RADIO_PARADISE_DOWNLOAD_PLUGIN="" diff --git a/README.md b/README.md index fa8ca44..8bea5c2 100644 --- a/README.md +++ b/README.md @@ -255,7 +255,7 @@ MEDIA_SERVER_FRIENDLY_NAME|Friendly name for the Media Server TIDAL_ENABLE|Set to `YES` to enable Tidal support, defaults to `no` TIDAL_TITLE|Set the title for Tidal plugin, defaults to `Tidal` TIDAL_AUTH_CHALLENGE_TYPE|Default login challenge type, `OAUTH2` (default) or `PKCE` -TIDAL_QUALITY|Possible values are `LOW` (mp3@96k), `HIGH` (mp3@320k), `LOSSLESS` (flac 44.1kHz), `HI_RES` (I believe it's MQA), `HI_RES_LOSSLESS` (flac@hires), defaults to `LOSSLESS` +TIDAL_AUDIO_QUALITY|Possible values are `LOW` (mp3@96k), `HIGH` (mp3@320k), `LOSSLESS` (flac 44.1kHz), `HI_RES` (I believe it's MQA), `HI_RES_LOSSLESS` (flac@hires), defaults to `LOSSLESS` TIDAL_TOKEN_TYPE|Tidal oauth2 token type TIDAL_ACCESS_TOKEN|Tidal oauth2 access token TIDAL_REFRESH_TOKEN|Tidal oauth2 refresh token @@ -268,6 +268,7 @@ TIDAL_PREPEND_NUMBER_IN_ITEM_LIST|Set to `yes` to create item numbers in lists ( TIDAL_DOWNLOAD_PLUGIN|If set to `YES`, the updated plugin is downloaded from the upstream repo 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`. 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 38bdcc5..e382cba 100644 --- a/app/bin/run-upmpdcli.sh +++ b/app/bin/run-upmpdcli.sh @@ -635,6 +635,15 @@ if [[ "${TIDAL_ENABLE^^}" == "YES" ]]; then exit 3 fi fi + # image caching + if [[ -n "${TIDAL_ENABLE_IMAGE_CACHING}" ]]; then + if [[ "${TIDAL_ENABLE_IMAGE_CACHING^^}" == "YES" || "${TIDAL_ENABLE_IMAGE_CACHING^^}" == "Y" ]]; then + echo "tidalenableimagecaching = 1" >> $CONFIG_FILE + elif [[ "${TIDAL_ENABLE_IMAGE_CACHING^^}" != "NO" && "${TIDAL_ENABLE_IMAGE_CACHING^^}" == "N" ]]; then + echo "Invalid TIDAL_ENABLE_IMAGE_CACHING=[${TIDAL_ENABLE_IMAGE_CACHING}]" + exit 3 + fi + fi fi echo "Qobuz Enable [$QOBUZ_ENABLE]" diff --git a/doc/change-history.md b/doc/change-history.md index 1e6884d..43b59c1 100644 --- a/doc/change-history.md +++ b/doc/change-history.md @@ -2,6 +2,7 @@ Change Date|Major Changes ---|--- +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)) 2024-10-15|Bump to upmpdcli version 1.8.18 (see issue [#442](https://github.com/GioF71/upmpdcli-docker/issues/442)) 2024-10-03|Fix ENABLE_AUTO_UPNPIP support (see issue [#440](https://github.com/GioF71/upmpdcli-docker/issues/440))