Skip to content

Commit c07d9aa

Browse files
authored
[Maintenance] Support newer versions of subsonic-connect library #318 (#319)
1 parent 9a31195 commit c07d9aa

10 files changed

+47
-538
lines changed

.github/workflows/docker-multi-arch.yml

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
3737
declare -A base_images
3838
base_images[mantic]=ubuntu:mantic
39+
base_images[lunar]=ubuntu:lunar
40+
base_images[kinetic]=ubuntu:kinetic
3941
base_images[jammy]=ubuntu:jammy
4042
base_images[bookworm]=debian:bookworm-slim
4143

Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,16 @@ ENV SUBSONIC_BASE_URL ""
147147
ENV SUBSONIC_PORT ""
148148
ENV SUBSONIC_USER ""
149149
ENV SUBSONIC_PASSWORD ""
150+
ENV SUBSONIC_LEGACYAUTH ""
150151
ENV SUBSONIC_ITEMS_PER_PAGE ""
151152
ENV SUBSONIC_APPEND_YEAR_TO_ALBUM ""
152153
ENV SUBSONIC_APPEND_CODECS_TO_ALBUM ""
153154
ENV SUBSONIC_WHITELIST_CODECS ""
154155
ENV SUBSONIC_DOWNLOAD_PLUGIN ""
155156
ENV SUBSONIC_PLUGIN_BRANCH ""
157+
ENV SUBSONIC_FORCE_CONNECTOR_VERSION ""
158+
ENV SUBSONIC_TRANSCODE_CODEC ""
159+
ENV SUBSONIC_TRANSCODE_MAX_BITRATE ""
156160

157161
ENV TIDAL_ENABLE ""
158162
ENV TIDAL_TOKEN_TYPE ""

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ I am now a contributor to upmpdcli for this plugin. See the git repository forks
5353
The plugin uses my [subsonic-connector](https://github.com/GioF71/subsonic-connector) library which in turn is built around [py-sonic](https://github.com/crustymonkey/py-sonic).
5454
Everything has been developed and tested against [Navidrome](https://www.navidrome.org/) but should work with other servers hopefully.
5555
See [this](https://github.com/navidrome/navidrome/discussions/2324) discussion on the Navidrome repo for updates and further information.
56-
The current version of the image includes Subsonic Plugin version `0.2.6`.
56+
The current version of the image includes Subsonic Plugin version `0.1.17`.
5757
If you use upmpdcli as a renderer for this plugin, you might probably want to setup a scrobbler, so that the Subsonic server can keep track of what you are playing. See [this](https://github.com/GioF71/mpd-subsonic-scrobbler) repository for more details.
5858

5959
### Scrobbling
@@ -204,12 +204,16 @@ SUBSONIC_BASE_URL|Subsonic base url. Example: `http://my_navidrome.homelab.local
204204
SUBSONIC_PORT|Subsonic port, defaults to `4533`
205205
SUBSONIC_USER|Subsonic username
206206
SUBSONIC_PASSWORD|Subsonic password
207+
SUBSONIC_LEGACYAUTH|Subsonic legacy authentication (`true`|`false`), set to `true` when using Lightweight Media Server (LMS)
207208
SUBSONIC_ITEMS_PER_PAGE|Number of items per page, defaults to `100`
208209
SUBSONIC_APPEND_YEAR_TO_ALBUM|If set to `yes` (default), the album year is appended to the album
209210
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
210211
SUBSONIC_WHITELIST_CODECS|List of comma-separated whitelist (ideally lossless) codecs. Defaults to `alac,wav,flac,dsf`
211212
SUBSONIC_DOWNLOAD_PLUGIN|If set to `YES`, the updated plugin is downloaded from the upstream repo
212-
SUBSONIC_PLUGIN_BRANCH|If `SUBSONIC_DOWNLOAD_PLUGIN`, the branch indicated by this variable will be used. Must be specified if enabling `SUBSONIC_DOWNLOAD_PLUGIN`. Suggested branch name is `latest-subsonic`
213+
SUBSONIC_PLUGIN_BRANCH|If `SUBSONIC_DOWNLOAD_PLUGIN`, the branch indicated by this variable will be used. Must be specified if enabling `SUBSONIC_DOWNLOAD_PLUGIN`. Suggested branch name is `next-subsonic`
214+
SUBSONIC_FORCE_CONNECTOR_VERSION|If set, the specified version of subsonic-connector will be installed over the one included in the image
215+
SUBSONIC_TRANSCODE_CODEC|If set, the value will be used as the transcode codec
216+
SUBSONIC_TRANSCODE_MAX_BITRATE|If set, the value will be used as the transcode max bitrate
213217
RADIO_PARADISE_ENABLE|Enable the Radio Paradise Plugin, set to `yes` to enable
214218
RADIO_PARADISE_DOWNLOAD_PLUGIN|If set to `YES`, the updated plugin is downloaded from the upstream repo
215219
RADIO_PARADISE_PLUGIN_BRANCH|If `RADIO_PARADISE_DOWNLOAD_PLUGIN` is set to `yes`, the branch indicated by this variable will be used. Must be specified if enabling `RADIO_PARADISE_DOWNLOAD_PLUGIN`. Suggested branch name is `latest-radio-paradise`

app/bin/run-upmpdcli.sh

+24
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,18 @@ echo "SUBSONIC_ENABLE=[$SUBSONIC_ENABLE]"
348348
if [ "${SUBSONIC_ENABLE^^}" == "YES" ]; then
349349
echo "Enabling Subsonic, processing settings";
350350
SUBSONIC_ENABLE=YES
351+
# do we need to download a newer subsonic-connector library?
352+
if [[ -n "${SUBSONIC_FORCE_CONNECTOR_VERSION}" ]]; then
353+
echo "Installing subsonic-connector version [${SUBSONIC_FORCE_CONNECTOR_VERSION}]"
354+
break_needed=`cat /app/conf/pip-install-break-needed`
355+
pip_switch=""
356+
if [[ "${break_needed}" == "yes" ]]; then
357+
pip_switch="--break-system-packages"
358+
fi
359+
pip_cmd="pip install ${pip_switch} subsonic-connector==${SUBSONIC_FORCE_CONNECTOR_VERSION}"
360+
echo "pip_cmd: [${pip_cmd}]"
361+
eval $pip_cmd
362+
fi
351363
sed -i 's/\#subsonicuser/subsonicuser/g' $CONFIG_FILE
352364
echo "SUBSONIC_AUTOSTART=[$SUBSONIC_AUTOSTART]"
353365
if [[ -z "${SUBSONIC_AUTOSTART^^}" || "${SUBSONIC_AUTOSTART}" == "1" || "${SUBSONIC_AUTOSTART^^}" == "YES" ]]; then
@@ -366,6 +378,10 @@ if [ "${SUBSONIC_ENABLE^^}" == "YES" ]; then
366378
echo "Setting subsonic password [$SUBSONIC_PASSWORD]"
367379
sed -i 's/\#subsonicpassword/subsonicpassword/g' $CONFIG_FILE
368380
sed -i 's/SUBSONIC_PASSWORD/'"$SUBSONIC_PASSWORD"'/g' $CONFIG_FILE
381+
if [[ -n "${SUBSONIC_LEGACYAUTH}" ]]; then
382+
sed -i 's/\#subsoniclegacyauth/subsoniclegacyauth/g' $CONFIG_FILE
383+
sed -i 's/SUBSONIC_LEGACYAUTH/'"$SUBSONIC_LEGACYAUTH"'/g' $CONFIG_FILE
384+
fi
369385
if [[ -n "${SUBSONIC_ITEMS_PER_PAGE}" ]]; then
370386
sed -i 's/\#subsonicitemsperpage/subsonicitemsperpage/g' $CONFIG_FILE
371387
sed -i 's/SUBSONIC_ITEMS_PER_PAGE/'"$SUBSONIC_ITEMS_PER_PAGE"'/g' $CONFIG_FILE
@@ -396,6 +412,14 @@ if [ "${SUBSONIC_ENABLE^^}" == "YES" ]; then
396412
sed -i 's/\#subsonicwhitelistcodecs/subsonicwhitelistcodecs/g' $CONFIG_FILE
397413
sed -i 's/SUBSONIC_WHITELIST_CODECS/'"$SUBSONIC_WHITELIST_CODECS"'/g' $CONFIG_FILE
398414
fi
415+
if [[ -n "${SUBSONIC_TRANSCODE_CODEC}" ]]; then
416+
sed -i 's/\#subsonictranscodecodec/subsonictranscodecodec/g' $CONFIG_FILE
417+
sed -i 's/SUBSONIC_TRANSCODE_CODEC/'"$SUBSONIC_TRANSCODE_CODEC"'/g' $CONFIG_FILE
418+
fi
419+
if [[ -n "${SUBSONIC_TRANSCODE_MAX_BITRATE}" ]]; then
420+
sed -i 's/\#subsonictranscodemaxbitrate/subsonictranscodemaxbitrate/g' $CONFIG_FILE
421+
sed -i 's/SUBSONIC_TRANSCODE_MAX_BITRATE/'"$SUBSONIC_TRANSCODE_MAX_BITRATE"'/g' $CONFIG_FILE
422+
fi
399423
fi
400424

401425
echo "RADIO_PARADISE_ENABLE=[$RADIO_PARADISE_ENABLE]"

app/conf/default-upmpdcli.conf

-267
This file was deleted.

0 commit comments

Comments
 (0)