aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2022-10-19 10:56:45 +0200
committerSébastien Dailly <sebastien@dailly.me>2022-10-19 10:56:45 +0200
commit17be2f120347f8c2cae63e932485813cf37e5993 (patch)
tree38dea5e4574bc5b4bb5ecaf5ff6b5585aeb3b1f6
parent1fac6d7043c22d6b452b632510ee2d9492ac20fb (diff)
Added playlists in mpd
-rw-r--r--board/mpd.sh40
-rw-r--r--configs/config6
2 files changed, 45 insertions, 1 deletions
diff --git a/board/mpd.sh b/board/mpd.sh
index 7644b94..f471fc1 100644
--- a/board/mpd.sh
+++ b/board/mpd.sh
@@ -45,3 +45,43 @@ audio_output {
server "127.0.0.1"
}
__EOF__
+
+cat << __EOF__ > "${TARGET_DIR}/home/fip.m3u"
+#EXTM3U
+#EXTINF:0,Radio France - FIP
+https://icecast.radiofrance.fr/fip-hifi.aac?id=radiofrance
+#EXTINF:0,Radio France - FIP Electro
+https://icecast.radiofrance.fr/fipelectro-hifi.aac?id=radiofrance
+#EXTINF:0,Radio France - FIP Groove
+https://icecast.radiofrance.fr/fipgroove-hifi.aac?id=radiofrance
+#EXTINF:0,Radio France - FIP Jazz
+https://icecast.radiofrance.fr/fipjazz-hifi.aac?id=radiofrance
+#EXTINF:0,Radio France - FIP Metal
+https://icecast.radiofrance.fr/fipmetal-hifi.aac
+#EXTINF:0,Radio France - FIP Nouveautés
+https://icecast.radiofrance.fr/fipnouveautes-hifi.aac?id=radiofrance
+#EXTINF:0,Radio France - FIP Reggae
+https://icecast.radiofrance.fr/fipreggae-hifi.aac?id=radiofrance
+#EXTINF:0,Radio France - FIP Rock
+https://icecast.radiofrance.fr/fiprock-hifi.aac?id=radiofrance
+#EXTINF:0,Radio France - FIP World
+https://icecast.radiofrance.fr/fipworld-hifi.aac?id=radiofrance
+__EOF__
+
+cat << __EOF__ > "${TARGET_DIR}/etc/systemd/system/playlists.service"
+[Unit]
+Description=Playlists
+After=network-online.target
+Wants=network-online.target
+
+[Service]
+Type=unit
+ExecStartPre=sleep 3
+ExecStart=find /home/ -name '*.m3u' -exec cp {} /tmp \;
+
+[Install]
+WantedBy=multi-user.target
+__EOF__
+
+# Create the link to the system configuration
+ln -sf /etc/systemd/system/playlists.service "${TARGET_DIR}/usr/lib/systemd/system/multi-user.target.wants/playlists.service"
diff --git a/configs/config b/configs/config
index af988fc..ad64e99 100644
--- a/configs/config
+++ b/configs/config
@@ -164,6 +164,10 @@ BR2_PACKAGE_MPD_LIBSNDFILE=y
BR2_PACKAGE_MPD_FFMPEG=y
BR2_PACKAGE_MPD_FAAD2=y
BR2_PACKAGE_MPD_OPUS=y
-BR2_PACKAGE_MPD_CURL=y
BR2_PACKAGE_MPD_ZZIP=y
BR2_PACKAGE_MPD_BZIP2=y
+
+# Required in order to connect stream radio from mpd.
+BR2_PACKAGE_MPD_CURL=y
+BR2_PACKAGE_CA_CERTIFICATES=y
+BR2_PACKAGE_LIBCURL_CURL=y