Skip to content

Commit

Permalink
[Feature] Support subsonic server side scrobbling #337 (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
GioF71 authored Nov 17, 2023
1 parent b7e4e34 commit 24c3c8d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ SUBSONIC_PORT|Subsonic port, defaults to `4533`
SUBSONIC_USER|Subsonic username
SUBSONIC_PASSWORD|Subsonic password
SUBSONIC_LEGACYAUTH|Subsonic legacy authentication (`yes`|`no`), set to `true` when using Lightweight Media Server (LMS) (requires subsonic-connector >= 0.2.6)
SUBSONIC_SERVER_SIDE_SCROBBLING|Subsonic server side scrobbling (`yes`|`no`), set to `true` if you want to enable
SUBSONIC_ITEMS_PER_PAGE|Number of items per page, defaults to `100`
SUBSONIC_APPEND_YEAR_TO_ALBUM|If set to `yes` (default), the album year is appended to the album
SUBSONIC_APPEND_CODECS_TO_ALBUM|If set to `yes` (default), the codecs for the album are appended to the album unless all codecs are in the white list
Expand Down
11 changes: 11 additions & 0 deletions app/bin/run-upmpdcli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,17 @@ if [ "${SUBSONIC_ENABLE^^}" == "YES" ]; then
sed -i 's/\#subsoniclegacyauth/subsoniclegacyauth/g' $CONFIG_FILE
sed -i 's/SUBSONIC_LEGACYAUTH/'"$legacy_auth_value"'/g' $CONFIG_FILE
fi
if [[ -n "${SUBSONIC_SERVER_SIDE_SCROBBLING}" ]]; then
server_side_scrobbling=0
if [[ "${SUBSONIC_SERVER_SIDE_SCROBBLING^^}" == "YES" || "${SUBSONIC_SERVER_SIDE_SCROBBLING^^}" == "Y" ]]; then
server_side_scrobbling=1
elif [[ ! ("${SUBSONIC_SERVER_SIDE_SCROBBLING^^}" == "NO" || "${SUBSONIC_SERVER_SIDE_SCROBBLING^^}" == "N") ]]; then
echo "Invalid SUBSONIC_SERVER_SIDE_SCROBBLING [${SUBSONIC_SERVER_SIDE_SCROBBLING}]"
exit 2
fi
sed -i 's/\#subsonicserversidescrobbling/subsonicserversidescrobbling/g' $CONFIG_FILE
sed -i 's/SUBSONIC_SERVER_SIDE_SCROBBLING/'"$server_side_scrobbling"'/g' $CONFIG_FILE
fi
if [[ -n "${SUBSONIC_ITEMS_PER_PAGE}" ]]; then
sed -i 's/\#subsonicitemsperpage/subsonicitemsperpage/g' $CONFIG_FILE
sed -i 's/SUBSONIC_ITEMS_PER_PAGE/'"$SUBSONIC_ITEMS_PER_PAGE"'/g' $CONFIG_FILE
Expand Down
1 change: 1 addition & 0 deletions app/conf/upmpdcli.conf
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ upradiostitle = Upmpdcli Radio List
#subsonicwhitelistcodecs = SUBSONIC_WHITELIST_CODECS
#subsonictranscodecodec = SUBSONIC_TRANSCODE_CODEC
#subsonictranscodemaxbitrate = SUBSONIC_TRANSCODE_MAX_BITRATE
#subsonicserversidescrobbling = SUBSONIC_SERVER_SIDE_SCROBBLING
#tidaluser = tidal
#tidalautostart = TIDAL_AUTOSTART
#tidaltokentype = TIDAL_TOKEN_TYPE
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-11-17|Support for subsonic server side scrobbling (see issue [#337](https://github.com/GioF71/upmpdcli-docker/issues/337))
2023-11-17|Write subsonic legacy auth configuration properly (see issue [#335](https://github.com/GioF71/upmpdcli-docker/issues/335))
2023-11-16|Add variable PLG_PROXY_METHOD (see issue [#325](https://github.com/GioF71/upmpdcli-docker/issues/325))
2023-11-15|Clarification about new subsonic features (see issue [#320](https://github.com/GioF71/upmpdcli-docker/issues/320))
Expand Down

0 comments on commit 24c3c8d

Please sign in to comment.