small fix

This commit is contained in:
LagradOst 2021-09-01 15:18:41 +02:00
parent d4014084cd
commit f570a60bba
4 changed files with 11 additions and 8 deletions

View file

@ -21,6 +21,7 @@ import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.BuildConfig
import com.lagradost.cloudstream3.MainActivity.Companion.showToast
import com.lagradost.cloudstream3.R
import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.mvvm.normalSafeApiCall
import java.io.File
import kotlin.concurrent.thread
@ -191,7 +192,7 @@ class InAppUpdater {
}
}
} catch (e : Exception) {
e.printStackTrace()
logError(e)
}
}
}, IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE)
@ -265,7 +266,7 @@ class InAppUpdater {
}
builder.show()
} catch (e: Exception) {
e.printStackTrace()
logError(e)
}
}
return true

View file

@ -1,5 +1,6 @@
package com.lagradost.cloudstream3.utils
import com.lagradost.cloudstream3.mvvm.logError
import java.lang.Exception
import java.lang.StringBuilder
import java.util.HashMap
@ -71,7 +72,7 @@ class JsUnpacker(packedJS: String?) {
return decoded.toString()
}
} catch (e: Exception) {
e.printStackTrace()
logError(e)
}
return null
}

View file

@ -33,6 +33,7 @@ import androidx.preference.PreferenceManager
import com.bumptech.glide.Glide
import com.bumptech.glide.load.model.GlideUrl
import com.lagradost.cloudstream3.R
import com.lagradost.cloudstream3.mvvm.logError
import kotlin.math.roundToInt
@ -91,7 +92,7 @@ object UIHelper {
.load(GlideUrl(url))
.into(this)
} catch (e : Exception) {
e.printStackTrace()
logError(e)
}
}

View file

@ -186,7 +186,7 @@ object VideoDownloadManager {
return try {
downloadStatus[id] ?: DownloadType.IsDone
} catch (e: Exception) {
e.printStackTrace()
logError(e)
DownloadType.IsDone
}
}
@ -661,7 +661,7 @@ object VideoDownloadManager {
}
} catch (e: IllegalStateException) {
e.printStackTrace()
logError(e)
}
}
@ -889,7 +889,7 @@ object VideoDownloadManager {
connection.getHeaderField("content-length").toLongOrNull() ?: connection.contentLength?.toLong() ?: 0L
}
} catch (e: Exception) {
e.printStackTrace()
logError(e)
0L
}
val bytesTotal = contentLength + resumeLength
@ -1017,7 +1017,7 @@ object VideoDownloadManager {
if (parentId != null)
downloadEvent -= downloadEventListener
} catch (e: Exception) {
e.printStackTrace()
logError(e)
}
try {