mirror of
https://github.com/koel/koel
synced 2024-11-28 06:50:27 +00:00
Remove redundant code
This commit is contained in:
parent
7f1ec0d305
commit
e96c4d5073
2 changed files with 1 additions and 14 deletions
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue