Skip to content

Commit

Permalink
[Feature] Support for Radio Paradise plugin #293 (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
GioF71 authored Oct 5, 2023
1 parent 69cf780 commit 08a3968
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ ENV TIDAL_AUDIO_QUALITY ""
ENV TIDAL_DOWNLOAD_PLUGIN ""
ENV TIDAL_PLUGIN_BRANCH ""

ENV RADIO_PARADISE_ENABLE ""
ENV RADIO_PARADISE_DOWNLOAD_PLUGIN ""
ENV RADIO_PARADISE_PLUGIN_BRANCH ""

ENV PUID ""
ENV PGID ""

Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ Current version is `1.8.3`.

## News

### Radio Paradise

We have a new Radio Paradise plugin for upmpdcli. I have contributed it to upmpdcli. See the git repository forks [here](https://framagit.org/medoc92/upmpdcli) and [here](https://codeberg.org/GioF71/upmpdcli).
This plugin has no additional dependencies. See the [configuration example](https://github.com/GioF71/upmpdcli-docker/blob/main/doc/example-configurations.md#radio-paradise) for information on how to create a container which will run this plugin.
Please note that the current release of upmpdcli does not include the plugin yet, the suggested configuration will download the python source code from my fork repo.

### Tidal support is back

We have a new, updated Tidal plugin for upmpdcli. I have contributed it to upmpdcli. See the git repository forks [here](https://framagit.org/medoc92/upmpdcli) and [here](https://codeberg.org/GioF71/upmpdcli).
Expand Down Expand Up @@ -200,10 +206,13 @@ SUBSONIC_APPEND_CODECS_TO_ALBUM|If set to `yes` (default), the codecs for the al
SUBSONIC_WHITELIST_CODECS|List of comma-separated whitelist (ideally lossless) codecs. Defaults to `alac,wav,flac,dsf`
SUBSONIC_DOWNLOAD_PLUGIN|If set to `YES`, the updated plugin is downloaded from the upstream repo
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`
RADIO_PARADISE_ENABLE|Enable the Radio Paradise Plugin, set to `yes` to enable
RADIO_PARADISE_DOWNLOAD_PLUGIN|If set to `YES`, the updated plugin is downloaded from the upstream repo
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`
PLG_MICRO_HTTP_HOST|IP for the qobuz local HTTP service.
PLG_MICRO_HTTP_PORT|Port for the qobuz local HTTP service.
MEDIA_SERVER_FRIENDLY_NAME|Friendly name for the Media Server
TIDAL_ENABLE|Set to `yes` to enable Tidal support, defaults to `no`
TIDAL_ENABLE|Set to `YES` to enable Tidal support, defaults to `no`
TIDAL_TOKEN_TYPE|Tidal token type
TIDAL_ACCESS_TOKEN|Tidal access token
TIDAL_REFRESH_TOKEN|Tidal refresh token
Expand Down
30 changes: 30 additions & 0 deletions app/bin/run-upmpdcli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@
# 1 Generic error
# 2 Invalid RENDERER_MODE value

if [[ "${RADIO_PARADISE_DOWNLOAD_PLUGIN^^}" == "YES" ]]; then
echo "Downloading updated Radio Paradise plugin"
if [[ -n "${RADIO_PARADISE_PLUGIN_BRANCH}" ]]; then
echo " using branch [$RADIO_PARADISE_PLUGIN_BRANCH]"
cd /app
mkdir -p src
cd /app/src
git clone https://framagit.org/GioF71/upmpdcli.git --branch ${RADIO_PARADISE_PLUGIN_BRANCH}
echo " copying updated files ..."
mkdir -p /usr/share/upmpdcli/cdplugins/radio-paradise
cp upmpdcli/src/mediaserver/cdplugins/radio-paradise/* /usr/share/upmpdcli/cdplugins/radio-paradise/
echo " copied, removing repo ..."
rm -Rf upmpdcli
echo " repo removed."
cd ..
rm -Rf src
echo " src directory removed."
fi
# return to the path
cd /app/bin
fi

if [[ "${SUBSONIC_DOWNLOAD_PLUGIN^^}" == "YES" ]]; then
echo "Downloading updated subsonic plugin"
if [[ -n "${SUBSONIC_PLUGIN_BRANCH}" ]]; then
Expand Down Expand Up @@ -255,6 +277,7 @@ if [[ "${UPRCL_ENABLE^^}" == "YES" ||
"${HRA_ENABLE^^}" == "YES" ||
"${DEEZER_ENABLE^^}" == "YES" ||
"${HRA_ENABLE^^}" == "YES" ||
"${RADIO_PARADISE_ENABLE^^}" == "YES" ||
"${QOBUZ_ENABLE^^}" == "YES" ]]; then
MEDIA_SERVER_ENABLED=1
fi
Expand Down Expand Up @@ -352,6 +375,13 @@ if [ "${SUBSONIC_ENABLE^^}" == "YES" ]; then
fi
fi

echo "RADIO_PARADISE_ENABLE=[$RADIO_PARADISE_ENABLE]"
if [ "${RADIO_PARADISE_ENABLE^^}" == "YES" ]; then
echo "Enabling Radio Paradise, processing settings";
RADIO_PARADISE_ENABLE=YES
sed -i 's/\#radio-paradiseuser/radio-paradiseuser/g' $CONFIG_FILE
fi

echo "TIDAL_ENABLE=[$TIDAL_ENABLE]"
if [ "${TIDAL_ENABLE^^}" == "YES" ]; then
echo "Enabling new Tidal, processing settings";
Expand Down
3 changes: 3 additions & 0 deletions app/conf/default-upmpdcli.conf
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@
# Deezer password.
#deezerpass = agoodpassword

# Radio Paradise
#radio-paradiseuser = radioparadise

# Local Media Server parameters

# Bogus user name variable.
Expand Down
3 changes: 3 additions & 0 deletions app/conf/upmpdcli-reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@
# Deezer password.
#deezerpass = agoodpassword

# Radio Paradise
#radio-paradiseuser = radioparadise

# Local Media Server parameters

# Bogus user name variable.
Expand Down
2 changes: 2 additions & 0 deletions app/conf/upmpdcli.conf
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,5 @@ upradiostitle = Upmpdcli Radio List
#tidalrefreshtoken = TIDAL_REFRESH_TOKEN
#tidalexpirytime = TIDAL_EXPIRY_TIME
#tidalaudioquality = TIDAL_AUDIO_QUALITY
# Radio Paradise
#radio-paradiseuser = radioparadise
26 changes: 26 additions & 0 deletions doc/example-configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,32 @@ services:

The configuration assumes the credentials to be stored in the `.env` file.

### Radio Paradise

A simple upmpdcli instance for accessing Radio Paradise webradios:

```text
---
version: "3"
services:
upmpdcli:
image: giof71/upmpdcli:latest
container_name: upmpdcli-radio-paradise
network_mode: host
environment:
- RENDERER_MODE=NONE
- FRIENDLY_NAME=Radio Paradise (upmpdcli)
- CHECK_CONTENT_FORMAT=yes
- RADIO_PARADISE_ENABLE=yes
- RADIO_BROWSER_ENABLE=yes
- RADIO_PARADISE_DOWNLOAD_PLUGIN=yes
- RADIO_PARADISE_PLUGIN_BRANCH=latest-radio-paradise
restart: unless-stopped
```

Please not that RADIO_PARADISE_DOWNLOAD_PLUGIN is currently mandatory for the plugin to work, until a new upmpdcli release including the plugin is released.

### Streaming Services

#### Tidal
Expand Down

0 comments on commit 08a3968

Please sign in to comment.