T357, T350: Restore updates from rPFf088badebbbb.

This commit is contained in:
Peter Deltchev 2015-09-12 20:45:56 -07:00
parent d076c63db0
commit 205e034174

View file

@ -42,7 +42,7 @@ class ImportMLPMA extends Command
* *
* @var array * @var array
*/ */
protected $ignoredExtensions = ['db', 'jpg', 'png', 'txt', 'rtf', 'wma']; protected $ignoredExtensions = ['db', 'jpg', 'png', 'txt', 'rtf', 'wma', 'wmv'];
/** /**
* Used to stop the import process when a SIGINT is received. * Used to stop the import process when a SIGINT is received.
@ -83,8 +83,8 @@ class ImportMLPMA extends Command
{ {
pcntl_signal(SIGINT, [$this, 'handleInterrupt']); pcntl_signal(SIGINT, [$this, 'handleInterrupt']);
$mlpmaPath = Config::get('ponyfm.files_directory') . 'mlpma'; $mlpmaPath = Config::get('ponyfm.files_directory') . '/mlpma';
$tmpPath = Config::get('ponyfm.files_directory') . 'tmp'; $tmpPath = Config::get('ponyfm.files_directory') . '/tmp';
if (!File::exists($tmpPath)) { if (!File::exists($tmpPath)) {
File::makeDirectory($tmpPath); File::makeDirectory($tmpPath);
@ -166,9 +166,13 @@ class ImportMLPMA extends Command
} elseif (Str::lower($file->getExtension()) === 'flac') { } elseif (Str::lower($file->getExtension()) === 'flac') {
list($parsedTags, $rawTags) = $this->getVorbisTags($allTags); list($parsedTags, $rawTags) = $this->getVorbisTags($allTags);
} elseif (Str::lower($file->getExtension()) === 'wav') {
list($parsedTags, $rawTags) = $this->getAtomTags($allTags);
} }
//==========================================================================================================
//==========================================================================================================
// Determine the release date. // Determine the release date.
//========================================================================================================== //==========================================================================================================
$modifiedDate = Carbon::createFromTimeStampUTC(File::lastModified($file->getPathname())); $modifiedDate = Carbon::createFromTimeStampUTC(File::lastModified($file->getPathname()));