mirror of
https://github.com/koel/koel
synced 2024-11-24 21:23:06 +00:00
Use isUnknown
This commit is contained in:
parent
b356800a32
commit
f86b3bfdb1
1 changed files with 7 additions and 2 deletions
|
@ -31,6 +31,11 @@ class Album extends Model
|
|||
return $this->hasMany(Song::class);
|
||||
}
|
||||
|
||||
public function isUnknown()
|
||||
{
|
||||
return $this->id === self::UNKNOWN_ID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an album using some provided information.
|
||||
*
|
||||
|
@ -54,12 +59,12 @@ class Album extends Model
|
|||
|
||||
/**
|
||||
* Get extra information about the album from Last.fm.
|
||||
*
|
||||
*
|
||||
* @return array|false
|
||||
*/
|
||||
public function getInfo()
|
||||
{
|
||||
if ($this->id === self::UNKNOWN_ID) {
|
||||
if ($this->isUnknown()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue