From 9468ced8c45f3d32982546345a373cee716f2e13 Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Sat, 12 Sep 2015 15:53:22 +0100 Subject: [PATCH] Merge rPF207569e5978d: T357: Ignore WMA files and added support for FLAC imports. --- app/Console/Commands/ImportMLPMA.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/Console/Commands/ImportMLPMA.php b/app/Console/Commands/ImportMLPMA.php index fa765a02..7f1f0c39 100644 --- a/app/Console/Commands/ImportMLPMA.php +++ b/app/Console/Commands/ImportMLPMA.php @@ -2,6 +2,7 @@ namespace App\Console\Commands; +use App\Album; use App\Commands\UploadTrackCommand; use App\Genre; use App\Image; @@ -41,7 +42,7 @@ class ImportMLPMA extends Command * * @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. @@ -159,12 +160,13 @@ class ImportMLPMA extends Command } elseif (Str::lower($file->getExtension()) === 'm4a') { list($parsedTags, $rawTags) = $this->getAtomTags($allTags); - } else { - if (Str::lower($file->getExtension()) === 'ogg') { - list($parsedTags, $rawTags) = $this->getVorbisTags($allTags); - } - } + } elseif (Str::lower($file->getExtension()) === 'ogg') { + list($parsedTags, $rawTags) = $this->getVorbisTags($allTags); + } elseif (Str::lower($file->getExtension()) === 'flac') { + list($parsedTags, $rawTags) = $this->getVorbisTags($allTags); + + } //========================================================================================================== // Determine the release date.