Always save contributing_artist_id for S3 put

This commit is contained in:
Phan An 2017-04-29 10:58:08 +08:00
parent 40deeb9f8b
commit a123243658
No known key found for this signature in database
GPG key ID: 4AF3D4E287BF423F

View file

@ -36,7 +36,7 @@ class SongController extends Controller
$song = Song::updateOrCreate(['id' => Media::getHash($path)], [
'path' => $path,
'album_id' => $album->id,
'contributing_artist_id' => $compilation ? $artist->id : null,
'contributing_artist_id' => $artist->id,
'title' => trim(array_get($tags, 'title', '')),
'length' => array_get($tags, 'duration', 0),
'track' => (int) array_get($tags, 'track'),