mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 04:58:01 +01:00
Switched to a file whitelist
This commit is contained in:
parent
c510dd7dfc
commit
9616538d9c
1 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,7 @@ class ImportPonify extends Command
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $ignoredExtensions = ['db', 'jpg', 'png'];
|
protected $allowedExtensions = ['mp3', 'aif', 'aiff', 'wav', 'flac', 'm4a', 'ogg'];
|
||||||
/**
|
/**
|
||||||
* Used to stop the import process when a SIGINT is received.
|
* Used to stop the import process when a SIGINT is received.
|
||||||
*
|
*
|
||||||
|
@ -128,7 +128,7 @@ class ImportPonify extends Command
|
||||||
|
|
||||||
$this->comment('[' . $this->currentFile . '/' . $totalFiles . '] Importing track [' . $file->getFilename() . ']...');
|
$this->comment('[' . $this->currentFile . '/' . $totalFiles . '] Importing track [' . $file->getFilename() . ']...');
|
||||||
|
|
||||||
if (in_array($file->getExtension(), $this->ignoredExtensions)) {
|
if (!in_array($file->getExtension(), $this->allowedExtensions)) {
|
||||||
$this->comment('This is not an audio file! Skipping...' . PHP_EOL);
|
$this->comment('This is not an audio file! Skipping...' . PHP_EOL);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue