What is the problem with this function Download on Kotlin?

Viewed 29

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
}
0 Answers
Related