From e3d2333dde436d48ed61de319d2aed25a89b5ef3 Mon Sep 17 00:00:00 2001 From: Junior Date: Thu, 4 Jul 2019 15:40:12 +0000 Subject: [PATCH] Change the MP3 player (mpg321) to a configurable option. --- config_dist.php | 4 ++++ functions.php | 2 +- scripts/homeaudio.ini | 1 + scripts/homeaudio_music.pl | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config_dist.php b/config_dist.php index 0664ae3..70aa2ca 100644 --- a/config_dist.php +++ b/config_dist.php @@ -29,6 +29,10 @@ define('MINVOLUME', 0); // the user that runs the web server process. Your mileage may vary. define('WEBUSERHOMEDIR', '/home/web'); +// Which mp3 player should we be using. This should just be the executable +// name and not the full path. +define('MP3PLAYER', 'mpg321'); + /* ---------------------- Below here be dragons ---------------------- */ define('ALBUMSTABLE', 'albums'); diff --git a/functions.php b/functions.php index e7526f2..e490e8d 100644 --- a/functions.php +++ b/functions.php @@ -1,7 +1,7 @@ execute($row[0]); } $sth->finish(); - $songcmd = "/usr/bin/mpg321 -q " . $songcmd; + $songcmd = $Config->{MP3PLAYER} . " -q " . $songcmd; if ( $debug ) { print("Next: " . $songcmd . "\n"); $dbh->disconnect(); exit(); } else {