mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 13:07:59 +01:00
Added null checks
This commit is contained in:
parent
cbcd5b1c91
commit
15bbad77dc
1 changed files with 8 additions and 2 deletions
|
@ -471,12 +471,18 @@ class ImportPonify extends Command
|
||||||
$track->genre_id = $genreId;
|
$track->genre_id = $genreId;
|
||||||
$track->track_number = $parsedTags['track_number'];
|
$track->track_number = $parsedTags['track_number'];
|
||||||
$track->released_at = $releasedAt;
|
$track->released_at = $releasedAt;
|
||||||
$track->description = $parsedTags['comments'];
|
|
||||||
$track->is_downloadable = true;
|
$track->is_downloadable = true;
|
||||||
$track->lyrics = $parsedTags['lyrics'];
|
|
||||||
$track->is_vocal = $isVocal;
|
$track->is_vocal = $isVocal;
|
||||||
$track->license_id = 2;
|
$track->license_id = 2;
|
||||||
|
|
||||||
|
if (!is_null($parsedTags['comments'])) {
|
||||||
|
$track->title = $parsedTags['comments'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!is_null($parsedTags['lyrics'])) {
|
||||||
|
$track->title = $parsedTags['lyrics'];
|
||||||
|
}
|
||||||
|
|
||||||
if (!is_null($parsedTags['title'])) {
|
if (!is_null($parsedTags['title'])) {
|
||||||
$track->title = $parsedTags['title'];
|
$track->title = $parsedTags['title'];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue