What is the problem with this function Download on Kotlin?
fun download (progressCallback: (Float , Long) -> Unit , tries: Int = 1): YoutubeDLResponse? {
var retry = tries
check(initialized) { "youtube-dl was not initialized! call YoutubeDLWrapper.init() first!" }
var response: YoutubeDLResponse?
do {
response = download(progressCallback)
if (response != null) {
break
}
} while (--retry > 0)
return response
}