Skip to content

Commit

Permalink
[Feature] support tidal prependnumberinitemlist (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
GioF71 authored Dec 11, 2023
1 parent df29116 commit 95fd36f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ ENV TIDAL_ACCESS_TOKEN ""
ENV TIDAL_REFRESH_TOKEN ""
ENV TIDAL_EXPIRY_TIME ""
ENV TIDAL_AUDIO_QUALITY ""
ENV TIDAL_PREPEND_NUMBER_IN_ITEM_LIST ""
ENV TIDAL_DOWNLOAD_PLUGIN ""
ENV TIDAL_PLUGIN_BRANCH ""

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ TIDAL_ACCESS_TOKEN|Tidal access token
TIDAL_REFRESH_TOKEN|Tidal refresh token
TIDAL_EXPIRY_TIME|Tidal expiry time
TIDAL_QUALITY|Possible values are `LOW` (mp3@96k), `HIGH` (mp3@320k), `LOSSLESS` ([email protected]), `HI_RES` (I believe it's MQA), `HI_RES_LOSSLESS` (flac@hires), defaults to `LOSSLESS`
TIDAL_PREPEND_NUMBER_IN_ITEM_LIST|Set to `yes` to create item numbers in lists (`[01] Item` instead of `Item`), mostly for kodi, disabled by default
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`
QOBUZ_ENABLE|Set to `yes` to enable Qobuz support, defaults to `no`
Expand Down
12 changes: 12 additions & 0 deletions app/bin/run-upmpdcli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## error codes
# 1 Generic error
# 2 Invalid RENDERER_MODE value
# 3 Invalid argument

if [[ "${MOTHER_EARTH_RADIO_DOWNLOAD_PLUGIN^^}" == "YES" ]]; then
echo "Downloading updated Mother Earth Radio plugin"
Expand Down Expand Up @@ -502,6 +503,17 @@ if [ "${TIDAL_ENABLE^^}" == "YES" ]; then
echo "Setting Audio Quality [$TIDAL_AUDIO_QUALITY]"
sed -i 's/\#tidalaudioquality/tidalaudioquality/g' $CONFIG_FILE
sed -i 's,TIDAL_AUDIO_QUALITY,'"$TIDAL_AUDIO_QUALITY"',g' $CONFIG_FILE
if [[ -n "${TIDAL_PREPEND_NUMBER_IN_ITEM_LIST}" ]]; then
echo "TIDAL_PREPEND_NUMBER_IN_ITEM_LIST=[${TIDAL_PREPEND_NUMBER_IN_ITEM_LIST}]"
if [[ "${TIDAL_PREPEND_NUMBER_IN_ITEM_LIST^^}" == "YES" || "${TIDAL_PREPEND_NUMBER_IN_ITEM_LIST^^}" == "Y" ]]; then
#set prependnumberinitemlist
sed -i 's/\#tidalprependnumberinitemlist/tidalprependnumberinitemlist/g' $CONFIG_FILE
sed -i 's,TIDAL_PREPEND_NUMBER_IN_ITEM_LIST,'"1"',g' $CONFIG_FILE
elif [[ "${TIDAL_PREPEND_NUMBER_IN_ITEM_LIST^^}" != "NO" && "${TIDAL_PREPEND_NUMBER_IN_ITEM_LIST^^}" == "N" ]]; then
echo "Invalid TIDAL_PREPEND_NUMBER_IN_ITEM_LIST=[${TIDAL_PREPEND_NUMBER_IN_ITEM_LIST}]"
exit 3
fi
fi
fi

echo "Qobuz Enable [$QOBUZ_ENABLE]"
Expand Down
1 change: 1 addition & 0 deletions app/conf/upmpdcli.conf
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ upradiostitle = Upmpdcli Radio List
#tidalrefreshtoken = TIDAL_REFRESH_TOKEN
#tidalexpirytime = TIDAL_EXPIRY_TIME
#tidalaudioquality = TIDAL_AUDIO_QUALITY
#tidalprependnumberinitemlist = TIDAL_PREPEND_NUMBER_IN_ITEM_LIST
# Radio Paradise
#radio-paradiseuser = radioparadise
#mother-earth-radiouser = motherearthradio
Expand Down
1 change: 1 addition & 0 deletions doc/change-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Change Date|Major Changes
---|---
2023-12-11|Support `prependnumberinitemlist` for Tidal (see issue [#351](https://github.com/GioF71/upmpdcli-docker/issues/351))
2023-11-29|Dropped bullseye and mantic builds (see issue [#348](https://github.com/GioF71/upmpdcli-docker/issues/348))
2023-11-29|Add support for webserverdocumentroot (see issue [#346](https://github.com/GioF71/upmpdcli-docker/issues/346))
2023-11-25|Support enabling internet radios in subsonic (see issue [#344](https://github.com/GioF71/upmpdcli-docker/issues/344))
Expand Down

0 comments on commit 95fd36f

Please sign in to comment.