Change the MP3 player (mpg321) to a configurable option.

This commit is contained in:
Junior 2019-07-04 15:40:12 +00:00
parent 305096f65e
commit e3d2333dde
4 changed files with 7 additions and 2 deletions

View File

@ -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');

View File

@ -1,7 +1,7 @@
<?php
function killPlayingSong() {
system("killall -q mpg321");
system("killall -q " . MP3PLAYER);
}
function setSystemVolume($newvol = null) {

View File

@ -4,6 +4,7 @@ DBPASS=dbpass
DBNAME=musicnew
MP3DIR=/mp3/
ARTDIR=/var/www/htdocs/m/art/
MP3PLAYER=mpg321
CHRISTMASGENRE=Christmas
YEARDECADES=1970,1980,1990,2000,2010
QUEUESINYEARS=Soundtracks,Lite,TamMusic,Rock,RnB-Rap,Dance - Techno,TamNew

View File

@ -184,7 +184,7 @@ while ( 1 ) {
$sth->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 {