mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2025-02-16 18:14:23 +01:00
T357: Actually classify tracks in the classifier and allow re-classification of published MLPMA tracks.
This commit is contained in:
parent
15760a1040
commit
9d087a9415
1 changed files with 6 additions and 7 deletions
|
@ -49,9 +49,7 @@ class ClassifyMLPMA extends Command {
|
||||||
{
|
{
|
||||||
// Get the list of tracks that need classification
|
// Get the list of tracks that need classification
|
||||||
$tracks = DB::table('mlpma_tracks')
|
$tracks = DB::table('mlpma_tracks')
|
||||||
->orderBy('mlpma_tracks.id')
|
->orderBy('id')
|
||||||
->join('tracks', 'tracks.id', '=', 'mlpma_tracks.track_id')
|
|
||||||
->whereNull('tracks.published_at')
|
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
$this->comment('Importing tracks...');
|
$this->comment('Importing tracks...');
|
||||||
|
@ -74,9 +72,6 @@ class ClassifyMLPMA extends Command {
|
||||||
//==========================================================================================================
|
//==========================================================================================================
|
||||||
// Original, show song remix, fan song remix, show audio remix, or ponified song?
|
// Original, show song remix, fan song remix, show audio remix, or ponified song?
|
||||||
//==========================================================================================================
|
//==========================================================================================================
|
||||||
$trackType = TrackType::ORIGINAL_TRACK;
|
|
||||||
$linkedSongIds = [];
|
|
||||||
|
|
||||||
$sanitizedTrackTitle = $parsedTags['title'];
|
$sanitizedTrackTitle = $parsedTags['title'];
|
||||||
$sanitizedTrackTitle = str_replace([' - ', 'ft.', '*'], ' ', $sanitizedTrackTitle);
|
$sanitizedTrackTitle = str_replace([' - ', 'ft.', '*'], ' ', $sanitizedTrackTitle);
|
||||||
|
|
||||||
|
@ -96,11 +91,15 @@ class ClassifyMLPMA extends Command {
|
||||||
list($trackType, $linkedSongIds) = $this->classifyTrack($track->filename, $officialSongs, true);
|
list($trackType, $linkedSongIds) = $this->classifyTrack($track->filename, $officialSongs, true);
|
||||||
|
|
||||||
|
|
||||||
// If it has "remix" in the name, it's definitely a remix.
|
// If it has "remix" in the name, it's definitely a remix.
|
||||||
} else if (Str::contains(Str::lower($sanitizedTrackTitle), 'remix')) {
|
} else if (Str::contains(Str::lower($sanitizedTrackTitle), 'remix')) {
|
||||||
$this->info('This is some kind of 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);
|
||||||
|
|
||||||
|
// No idea what this is. Have the pony at the terminal figure it out!
|
||||||
|
} else {
|
||||||
|
list($trackType, $linkedSongIds) = $this->classifyTrack($track->filename, $officialSongs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue