Commit 4e56b2e0 authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

Add variable to set the radio scripts location

parent c2968219
......@@ -75,6 +75,14 @@ upmpdcli with Credentials enabled. Credentials does
not work at this point anyway (12/2020), but it is enabled anyway,
because some Kazoo versions crash if it is not enabled.
[[ohinfotexttodata]]
ohinfotexttodata:: Store metadata into the OpenHome "metatext" variable. The OpenHome Info service are supposed to hold different data,
mostly for radios, with permanent radio data (icon, url, radio name) set
in the "Metadata" variable, and information about the current title recorded
in the "Metatext" variable. Setting this option will have upmpdcli store
any non-empty Metatext data in the Metadata variable. This will help some
players display the album art for the current title (e.g. Kazoo).
[[saveohcredentials]]
saveohcredentials:: Save the streaming
services login parameters to disk. This allows sharing the
......@@ -234,6 +242,12 @@ radios in the main configuration file, they MUST occur at the end of the
file (because they are defined as subsections, the last of which extends
to the end of the file).
[[radioscripts]]
radioscripts:: Radio metadata scripts directory. Path of a directory where the scripts used for fetching the
channel metadata are located. The default is
/usr/share/upmpdcli/radio_scripts. Note that the scripts are always first
looked for in the locations defined by $PATH.
[[ohmanufacturername]]
ohmanufacturername:: Manufacturer
name.
......
......@@ -60,6 +60,10 @@ static string find_script(const string& icmd)
if (path_isabsolute(icmd))
return icmd;
std::string scriptsdir;
if (!g_config->get("radioscripts", scriptsdir)) {
scriptsdir = path_cat(g_datadir, "radio_scripts");
}
// Append the radio scripts dir to the PATH. Put at the end so
// that the user can easily override a script by putting the
// modified version in the PATH env variable
......@@ -67,7 +71,7 @@ static string find_script(const string& icmd)
if (!cp) //??
cp = "";
string PATH(cp);
PATH = PATH + path_PATHsep() + path_cat(g_datadir, "radio_scripts");
PATH = PATH + path_PATHsep() + scriptsdir;
string cmd;
if (ExecCmd::which(icmd, cmd, PATH.c_str())) {
return cmd;
......
......@@ -41,6 +41,8 @@
#openhome = 1
# Disable the OpenHome Credentials service.
#lumincompat = 0
# Store metadata into the OpenHome "metatext" variable.
#ohinfotexttodata = 0
# Save the streaming services login parameters to disk.
#saveohcredentials = 1
# Check that input format is supported.
......@@ -99,6 +101,8 @@
#ohproductroom = Main Room
# Path to an external file with radio definitions.
radiolist = /usr/share/upmpdcli/radio_scripts/radiolist.conf
# Radio metadata scripts directory.
#radioscripts = /usr/share/upmpdcli/radio_scripts
# Manufacturer name.
#ohmanufacturername = UpMPDCli heavy industries Co.
# Manufacturer information.
......
......@@ -278,6 +278,17 @@
# </var>
radiolist = /usr/share/upmpdcli/radio_scripts/radiolist.conf
# <var name="radioscripts" type="fn">
# <brief>Radio metadata scripts directory.</brief>
#
# <descr>Path of a directory where the scripts used for fetching the
# channel metadata are located. The default is
# /usr/share/upmpdcli/radio_scripts. Note that the scripts are always first
# looked for in the locations defined by $PATH.</descr>
#
# </var>
#radioscripts = /usr/share/upmpdcli/radio_scripts
# <var name="ohmanufacturername" type="string"><brief>Manufacturer
# name. </brief></var>
#ohmanufacturername = UpMPDCli heavy industries Co.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment