Merge branch 'master' of github.com:koel/koel into master

This commit is contained in:
Phan An 2022-04-21 18:36:48 +02:00
commit 699e2b5a98
No known key found for this signature in database
GPG key ID: A81E4477F0BB6FDC

View file

@ -19,12 +19,14 @@ class SongController extends Controller
public function put(PutSongRequest $request) public function put(PutSongRequest $request)
{ {
$artist = array_get($request->tags, 'artist', '');
$albumartist = trim(array_get($request->tags, 'albumartist', ''));
$song = $this->s3Service->createSongEntry( $song = $this->s3Service->createSongEntry(
$request->bucket, $request->bucket,
$request->key, $request->key,
array_get($request->tags, 'artist'), $artist,
array_get($request->tags, 'album'), array_get($request->tags, 'album'),
(bool) trim(array_get($request->tags, 'albumartist')), (bool) $albumartist && $albumartist !== $artist,
array_get($request->tags, 'cover'), array_get($request->tags, 'cover'),
trim(array_get($request->tags, 'title', '')), trim(array_get($request->tags, 'title', '')),
(int) array_get($request->tags, 'duration', 0), (int) array_get($request->tags, 'duration', 0),