feat: set icecast mount default charset to UTF-8

On first install, configure icecast to use utf-8 as default charset for it's mounts.

Fixes #2501
This commit is contained in:
jo 2023-04-07 00:26:38 +02:00 committed by Kyle Robbertze
parent 31e69a60f7
commit 755848482d
4 changed files with 40 additions and 4 deletions

View File

@ -28,10 +28,18 @@ When sending metadata about your stream to an Icecast server in non-Latin alphab
The solution is to specify that the metadata for the MP3 mount point you are using should be interpreted using UTF-8 encoding. You can do this by adding the following stanza to the `/etc/icecast2/icecast.xml` file, where `libretime.mp3` is the name of your mount point:
```xml
<mount>
<mount type="normal">
<mount-name>/libretime.mp3</mount-name>
<charset>UTF-8</charset>
</mount>
</mount>
```
Or if you want to default to UTF-8 for all the mount points:
```xml
<mount type="default">
<charset>UTF-8</charset>
</mount>
```
After saving the `/etc/icecast2/icecast.xml` file, restart the Icecast server with `sudo systemctl restart icecast2`.

View File

@ -26,6 +26,27 @@ Please follow this **before the upgrade procedure**.
## :arrow_up: Upgrading
### Icecast mount default charset
During the first installation, the installer will configure Icecast to use UTF-8 as default charset for mounts. To upgrade an existing installation, you may want to manually apply the changes in the `/etc/icecast2/icecast.xml`:
```xml
<mount type="default">
<charset>UTF-8</charset>
</mount>
```
Or if only want to set the charset to UTF-8 for specific mounts (for example `/main.mp3`):
```xml
<mount type="normal">
<mount-name>/main.mp3</mount-name>
<charset>UTF-8</charset>
</mount>
```
Please, see the [documentation for more details](../admin-manual/stream-configuration.md#utf-8-metadata-in-icecast-mp3-streams).
## :warning: Known issues
The following issues may need a workaround for the time being. Please search the [issues](https://github.com/libretime/libretime/issues) before reporting problems not listed below.

View File

@ -556,6 +556,10 @@ if $LIBRETIME_SETUP_ICECAST; then
if $is_first_install; then
icecast_config_filepath="/etc/icecast2/icecast.xml"
cp_if_different \
"${SCRIPT_DIR}/installer/icecast/icecast.xml" \
"$icecast_config_filepath"
sed --in-place \
-e "s|<admin-password>[^<]*</admin-password>|<admin-password>${LIBRETIME_ICECAST_ADMIN_PASSWORD}</admin-password>|" \
-e "s|<source-password>[^<]*</source-password>|<source-password>${LIBRETIME_ICECAST_SOURCE_PASSWORD}</source-password>|" \

View File

@ -142,6 +142,9 @@
</http-headers>
</mount>
-->
<mount type="default">
<charset>UTF-8</charset>
</mount>
<!-- Normal mounts -->
<!--