diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt index c8b5b73d..479443f4 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt @@ -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 diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/JsUnpacker.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/JsUnpacker.kt index 227d3f34..a082af68 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/JsUnpacker.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/JsUnpacker.kt @@ -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 } diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/UIHelper.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/UIHelper.kt index d330ae94..48bab7f2 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/UIHelper.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/UIHelper.kt @@ -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) } } diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/VideoDownloadManager.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/VideoDownloadManager.kt index bb8429bf..3285ef04 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/VideoDownloadManager.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/VideoDownloadManager.kt @@ -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 {