diff --git a/lib/funkblubber.dart b/lib/funkblubber.dart index 028b862..a04df19 100644 --- a/lib/funkblubber.dart +++ b/lib/funkblubber.dart @@ -8,6 +8,7 @@ Future download({ required final FunkObject object, final String path = '.', }) async { + console.info('Downloading'); switch (object.kind) { case FunkEntity.album: await _downloadAlbum(object, path); @@ -18,6 +19,7 @@ Future download({ return; default: + console.info(' nothing...'); return; } } @@ -33,6 +35,7 @@ Future _downloadArtist( final String pathAppend = response.data['name']; await Directory('$path/$pathAppend').create(); + console.info('Artist: $pathAppend'); response = await Dio().get( 'https://${object.domain}/api/v1/albums/?' @@ -64,6 +67,7 @@ Future _downloadAlbum( final String pathAppend = response.data['results'][0]['album']['title']; await Directory('$path/$pathAppend').create(); + console.info('Album: $pathAppend'); for (final songResponse in response.data['results']) { final String songTitle = songResponse['title']; @@ -90,6 +94,7 @@ Future _downloadSongObject( followRedirects: false, ), ); + console.info('- $path'); final File file = File(path); final accessFile = file.openSync(mode: FileMode.write); accessFile.writeFromSync(response.data);