mirror of
https://github.com/Shabinder/SpotiFlyer.git
synced 2024-11-22 01:04:31 +01:00
Version Bumped to 2.3.0
This commit is contained in:
parent
60b2f04780
commit
5118aa10c4
@ -18,7 +18,7 @@
|
||||
|
||||
object Versions {
|
||||
// App's Version (To be bumped at each update)
|
||||
const val versionName = "2.2.5"
|
||||
const val versionName = "2.3.0"
|
||||
|
||||
// Kotlin
|
||||
const val kotlinVersion = "1.4.32"
|
||||
@ -45,7 +45,7 @@ object Versions {
|
||||
const val slf4j = "1.7.30"
|
||||
|
||||
// Android
|
||||
const val versionCode = 16
|
||||
const val versionCode = 17
|
||||
const val minSdkVersion = 21
|
||||
const val compileSdkVersion = 29
|
||||
const val targetSdkVersion = 29
|
||||
|
@ -163,6 +163,7 @@ class ForegroundService : Service(), CoroutineScope {
|
||||
private fun downloadAllTracks(trackList: List<TrackDetails>) {
|
||||
trackList.forEach {
|
||||
launch(Dispatchers.IO) {
|
||||
downloadService.execute {
|
||||
if (!it.videoID.isNullOrBlank()) { // Video ID already known!
|
||||
downloadTrack(it.videoID!!, it)
|
||||
} else {
|
||||
@ -181,6 +182,7 @@ class ForegroundService : Service(), CoroutineScope {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun downloadTrack(videoID: String, track: TrackDetails) {
|
||||
try {
|
||||
@ -197,7 +199,7 @@ class ForegroundService : Service(), CoroutineScope {
|
||||
}
|
||||
}
|
||||
|
||||
private fun enqueueDownload(url: String, track: TrackDetails) {
|
||||
private suspend fun enqueueDownload(url: String, track: TrackDetails) {
|
||||
// Initiating Download
|
||||
addToNotification("Downloading ${track.title}")
|
||||
logger.d(tag) { "${track.title} Download Started" }
|
||||
@ -205,8 +207,6 @@ class ForegroundService : Service(), CoroutineScope {
|
||||
sendTrackBroadcast(Status.DOWNLOADING.name, track)
|
||||
|
||||
// Enqueueing Download
|
||||
launch {
|
||||
downloadService.execute {
|
||||
downloadFile(url).collect {
|
||||
when (it) {
|
||||
is DownloadResult.Error -> {
|
||||
@ -261,8 +261,6 @@ class ForegroundService : Service(), CoroutineScope {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* If fetch Fails , Android Download Manager To RESCUE!!
|
||||
|
Loading…
Reference in New Issue
Block a user