Check if the sounds directory exists
This commit is contained in:
parent
6fa40778f7
commit
3cf0334686
|
|
@ -66,9 +66,11 @@ class file {
|
||||||
if (!isset($voice)) { $voice = 'callie'; }
|
if (!isset($voice)) { $voice = 'callie'; }
|
||||||
|
|
||||||
//set the variables
|
//set the variables
|
||||||
$dir = $_SESSION['switch']['sounds']['dir'].'/'.$language.'/'.$dialect.'/'.$voice;
|
if (!empty($_SESSION['switch']['sounds']['dir']) && file_exists($_SESSION['switch']['sounds']['dir'])) {
|
||||||
$rate = '8000';
|
$dir = $_SESSION['switch']['sounds']['dir'].'/'.$language.'/'.$dialect.'/'.$voice;
|
||||||
$files = $this->glob($dir.'/*/'.$rate, true);
|
$rate = '8000';
|
||||||
|
$files = $this->glob($dir.'/*/'.$rate, true);
|
||||||
|
}
|
||||||
|
|
||||||
//loop through the languages
|
//loop through the languages
|
||||||
if (!empty($files)) {
|
if (!empty($files)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue