mirror of
https://github.com/koel/koel
synced 2024-11-24 21:23:06 +00:00
Fix AWS S3 related issues. (#757)
* Avoid an error from MySQL, "Column cannot be null". Similar to this issue: https://stackoverflow.com/questions/43860634/laravel-5-4-upgrade-integrity-constraint-violation-column-cannot-be-null * Clears the media cache after storing a new song.
This commit is contained in:
parent
1475ebaddf
commit
064d6f8615
1 changed files with 3 additions and 2 deletions
|
@ -40,11 +40,12 @@ class SongController extends Controller
|
|||
'album_id' => $album->id,
|
||||
'artist_id' => $artist->id,
|
||||
'title' => trim(array_get($tags, 'title', '')),
|
||||
'length' => array_get($tags, 'duration', 0),
|
||||
'length' => array_get($tags, 'duration', 0) ?: 0,
|
||||
'track' => (int) array_get($tags, 'track'),
|
||||
'lyrics' => array_get($tags, 'lyrics', ''),
|
||||
'lyrics' => array_get($tags, 'lyrics', '') ?: '',
|
||||
'mtime' => time(),
|
||||
]);
|
||||
event(new LibraryChanged());
|
||||
|
||||
return response()->json($song);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue