From 8e9533c5e3c63f868a6def4b0029247a5e723c75 Mon Sep 17 00:00:00 2001 From: Moritz Grimm Date: Mon, 2 Jan 2017 02:08:26 +0100 Subject: [PATCH] Allow external control of meta.sh output for increased usefulness --- examples/Makefile.am | 5 ++++- examples/artist.txt | 1 + examples/meta.sh | 9 ++++++--- examples/metadata.txt | 1 + examples/title.txt | 1 + 5 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 examples/artist.txt create mode 100644 examples/metadata.txt create mode 100644 examples/title.txt diff --git a/examples/Makefile.am b/examples/Makefile.am index 1bb33b5..726f28b 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -5,7 +5,10 @@ dist_examples_DATA = \ ezstream-file_template.xml \ ezstream-full.xml \ ezstream-minimal.xml \ - ezstream-video.xml + ezstream-video.xml \ + metadata.txt \ + artist.txt \ + title.txt dist_examples_SCRIPTS = meta.sh play.sh playlist-logger.sh CLEANFILES = core *.core *~ .*~ diff --git a/examples/artist.txt b/examples/artist.txt new file mode 100644 index 0000000..1a8481b --- /dev/null +++ b/examples/artist.txt @@ -0,0 +1 @@ +Great Artist diff --git a/examples/meta.sh b/examples/meta.sh index 977637e..b4d65bb 100755 --- a/examples/meta.sh +++ b/examples/meta.sh @@ -2,7 +2,10 @@ # Minimalist example metadata script that has the behavior required by # ezstream. +# +# From the current working directory, return the contents of metadata.txt, +# artist.txt, and title.txt. -test -z "${1}" && echo "Ezstream presents" -test x"${1}" = "xartist" && echo "Great Artist" -test x"${1}" = "xtitle" && echo "Great Song" +test -z "${1}" && cat metadata.txt 2> /dev/null +test x"${1}" = "xartist" && cat artist.txt 2> /dev/null +test x"${1}" = "xtitle" && cat title.txt 2> /dev/null diff --git a/examples/metadata.txt b/examples/metadata.txt new file mode 100644 index 0000000..4ae50d2 --- /dev/null +++ b/examples/metadata.txt @@ -0,0 +1 @@ +Ezstream presents: Great Artist - Great Song diff --git a/examples/title.txt b/examples/title.txt new file mode 100644 index 0000000..fdf931a --- /dev/null +++ b/examples/title.txt @@ -0,0 +1 @@ +Great Song