From e96c4d50732afe17116dbdf46dec94413f22cb99 Mon Sep 17 00:00:00 2001 From: Phan An Date: Sat, 10 Jun 2017 12:36:32 +0100 Subject: [PATCH] Remove redundant code --- app/Models/Artist.php | 10 ---------- app/Services/Download.php | 5 +---- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/app/Models/Artist.php b/app/Models/Artist.php index c76d53e7..ab43f90d 100644 --- a/app/Models/Artist.php +++ b/app/Models/Artist.php @@ -126,16 +126,6 @@ class Artist extends Model return $info; } - /** - * Get songs *contributed* (in compilation albums) by the artist. - * - * @return \Illuminate\Database\Eloquent\Collection - */ - public function getContributedSongs() - { - return Song::whereContributingArtistId($this->id)->get(); - } - /** * Turn the image name into its absolute URL. * diff --git a/app/Services/Download.php b/app/Services/Download.php index 2f62c14e..6733ed1d 100644 --- a/app/Services/Download.php +++ b/app/Services/Download.php @@ -118,9 +118,6 @@ class Download protected function fromArtist(Artist $artist) { - // Don't forget the contributed songs. - $songs = $artist->songs->merge($artist->getContributedSongs()); - - return $this->fromMultipleSongs($songs); + return $this->fromMultipleSongs($artist->songs); } }