Merge rPF207569e5978d: T357: Ignore WMA files and added support for FLAC imports.

This commit is contained in:
Kelvin Zhang 2015-09-12 15:53:22 +01:00
parent 2ac9fd6967
commit 9468ced8c4

View file

@ -2,6 +2,7 @@
namespace App\Console\Commands; namespace App\Console\Commands;
use App\Album;
use App\Commands\UploadTrackCommand; use App\Commands\UploadTrackCommand;
use App\Genre; use App\Genre;
use App\Image; use App\Image;
@ -41,7 +42,7 @@ class ImportMLPMA extends Command
* *
* @var array * @var array
*/ */
protected $ignoredExtensions = ['db', 'jpg', 'png', 'txt', 'rtf']; protected $ignoredExtensions = ['db', 'jpg', 'png', 'txt', 'rtf', 'wma'];
/** /**
* Used to stop the import process when a SIGINT is received. * Used to stop the import process when a SIGINT is received.
@ -159,12 +160,13 @@ class ImportMLPMA extends Command
} elseif (Str::lower($file->getExtension()) === 'm4a') { } elseif (Str::lower($file->getExtension()) === 'm4a') {
list($parsedTags, $rawTags) = $this->getAtomTags($allTags); list($parsedTags, $rawTags) = $this->getAtomTags($allTags);
} else { } elseif (Str::lower($file->getExtension()) === 'ogg') {
if (Str::lower($file->getExtension()) === 'ogg') { list($parsedTags, $rawTags) = $this->getVorbisTags($allTags);
list($parsedTags, $rawTags) = $this->getVorbisTags($allTags);
}
}
} elseif (Str::lower($file->getExtension()) === 'flac') {
list($parsedTags, $rawTags) = $this->getVorbisTags($allTags);
}
//========================================================================================================== //==========================================================================================================
// Determine the release date. // Determine the release date.