diff --git a/common/dependency-injection/src/androidMain/kotlin/com/shabinder/common/di/AndroidActual.kt b/common/dependency-injection/src/androidMain/kotlin/com/shabinder/common/di/AndroidActual.kt index 3ec239c7..8ea44d9e 100644 --- a/common/dependency-injection/src/androidMain/kotlin/com/shabinder/common/di/AndroidActual.kt +++ b/common/dependency-injection/src/androidMain/kotlin/com/shabinder/common/di/AndroidActual.kt @@ -21,9 +21,6 @@ import android.content.Intent import android.content.pm.PackageManager import android.net.Uri import androidx.core.content.ContextCompat -import com.github.kiulian.downloader.model.YoutubeVideo -import com.github.kiulian.downloader.model.formats.Format -import com.github.kiulian.downloader.model.quality.AudioQuality import com.razorpay.Checkout import com.shabinder.common.database.activityContext import com.shabinder.common.di.worker.ForegroundService @@ -110,20 +107,4 @@ actual suspend fun downloadTracks( serviceIntent.putParcelableArrayListExtra("object", ArrayList(list)) activityContext.let { ContextCompat.startForegroundService(it, serviceIntent) } } -} - -fun YoutubeVideo.getData(): Format? { - return try { - findAudioWithQuality(AudioQuality.medium)?.get(0) as Format - } catch (e: java.lang.IndexOutOfBoundsException) { - try { - findAudioWithQuality(AudioQuality.high)?.get(0) as Format - } catch (e: java.lang.IndexOutOfBoundsException) { - try { - findAudioWithQuality(AudioQuality.low)?.get(0) as Format - } catch (e: java.lang.IndexOutOfBoundsException) { - null - } - } - } -} +} \ No newline at end of file