From 5b10bf3324cf7339a3947e433b151a06df125734 Mon Sep 17 00:00:00 2001 From: emkartal1 Date: Sun, 30 Jul 2023 14:31:16 +0200 Subject: [PATCH] Fix MusicViewModel error --- Sources/justMUSIC/lib/view_model/MusicViewModel.dart | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Sources/justMUSIC/lib/view_model/MusicViewModel.dart b/Sources/justMUSIC/lib/view_model/MusicViewModel.dart index 8b5dc4a..5d9570d 100644 --- a/Sources/justMUSIC/lib/view_model/MusicViewModel.dart +++ b/Sources/justMUSIC/lib/view_model/MusicViewModel.dart @@ -201,22 +201,16 @@ class MusicViewModel { return Artist(artist['id'], artist['name'], ''); })); - DateTime releaseDate = - DateTime.parse(track['track']['album']['release_date']); - musics.add(Music( track['track']['id'], track['track']['name'], track['track']['album']['images'][0]['url'], track['track']['preview_url'], - int.parse(responseData['album']['release_date'].split('-')[0]), + int.parse(track['track']['album']['release_date'].split('-')[0]), track['track']['duration_ms'] / 1000, track['track']['explicit'], artists)); } - /* - List musics = _getMusicsFromResponse(responseData['tracks']['items']); - }*/ return musics; } else {