diff --git a/app/commands/ClassifyMLPMA.php b/app/commands/ClassifyMLPMA.php index 8d7339b1..597a565a 100644 --- a/app/commands/ClassifyMLPMA.php +++ b/app/commands/ClassifyMLPMA.php @@ -88,18 +88,18 @@ class ClassifyMLPMA extends Command { if (Str::contains(Str::lower($track->filename), 'ingram')) { $this->info('This is an official song remix!'); - list($trackType, $linkedSongIds) = $this->classifyTrack($track->filename, $officialSongs, true); + list($trackType, $linkedSongIds) = $this->classifyTrack($track->filename, $officialSongs, true, $parsedTags); // If it has "remix" in the name, it's definitely a remix. } else if (Str::contains(Str::lower($sanitizedTrackTitle), 'remix')) { $this->info('This is some kind of remix!'); - list($trackType, $linkedSongIds) = $this->classifyTrack($track->filename, $officialSongs); + list($trackType, $linkedSongIds) = $this->classifyTrack($track->filename, $officialSongs, false, $parsedTags); // No idea what this is. Have the pony at the terminal figure it out! } else { - list($trackType, $linkedSongIds) = $this->classifyTrack($track->filename, $officialSongs); + list($trackType, $linkedSongIds) = $this->classifyTrack($track->filename, $officialSongs, false, $parsedTags); } @@ -154,7 +154,7 @@ class ClassifyMLPMA extends Command { * @param bool|false $isRemixOfOfficialTrack * @return array */ - protected function classifyTrack($filename, $officialSongs, $isRemixOfOfficialTrack = false) { + protected function classifyTrack($filename, $officialSongs, $isRemixOfOfficialTrack = false, $tags) { $trackTypeId = null; $linkedSongIds = []; @@ -181,7 +181,11 @@ class ClassifyMLPMA extends Command { } $this->question('If this is a medley, multiple song ID\'s can be separated by commas. '); $this->question(' '); - $this->question(' ' . $filename . ' '); + $this->question(' ' . $filename . ' '); + $this->question(' '); + $this->question(' Title: '.$tags['title'].' '); + $this->question(' Album: '.$tags['album'].' '); + $this->question(' Artist: '.$tags['artist'].' '); $this->question(' '); $this->question(' r = official song remix (accept all "guessed" matches) '); $this->question(' # = official song remix (enter the ID(s) of the show song(s)) '); diff --git a/app/commands/ImportMLPMA.php b/app/commands/ImportMLPMA.php index 8bcef59c..cb966ca5 100644 --- a/app/commands/ImportMLPMA.php +++ b/app/commands/ImportMLPMA.php @@ -391,7 +391,16 @@ class ImportMLPMA extends Command { * @return array */ protected function getId3Tags($rawTags) { - $tags = $rawTags['tags']['id3v2']; + if (array_key_exists('id3v2', $rawTags['tags'])) { + $tags = $rawTags['tags']['id3v2']; + + } else if (array_key_exists('id3v1', $rawTags['tags'])) { + $tags = $rawTags['tags']['id3v1']; + + } else { + $tags = []; + } + $comment = null; if (isset($tags['comment'])) {