mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
hotfix: Remove resume information (#1063)
This commit is contained in:
parent
949b5830b6
commit
c07e6d3222
2 changed files with 5 additions and 1 deletions
|
@ -13,6 +13,8 @@ import androidx.annotation.MainThread
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.view.isGone
|
import androidx.core.view.isGone
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
|
import com.lagradost.cloudstream3.AcraApplication.Companion.getKey
|
||||||
|
import com.lagradost.cloudstream3.AcraApplication.Companion.removeKey
|
||||||
import com.lagradost.cloudstream3.R
|
import com.lagradost.cloudstream3.R
|
||||||
import com.lagradost.cloudstream3.mvvm.logError
|
import com.lagradost.cloudstream3.mvvm.logError
|
||||||
import com.lagradost.cloudstream3.ui.download.DOWNLOAD_ACTION_DELETE_FILE
|
import com.lagradost.cloudstream3.ui.download.DOWNLOAD_ACTION_DELETE_FILE
|
||||||
|
@ -25,6 +27,7 @@ import com.lagradost.cloudstream3.ui.download.DownloadClickEvent
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper.popupMenuNoIcons
|
import com.lagradost.cloudstream3.utils.UIHelper.popupMenuNoIcons
|
||||||
import com.lagradost.cloudstream3.utils.VideoDownloadHelper
|
import com.lagradost.cloudstream3.utils.VideoDownloadHelper
|
||||||
import com.lagradost.cloudstream3.utils.VideoDownloadManager
|
import com.lagradost.cloudstream3.utils.VideoDownloadManager
|
||||||
|
import com.lagradost.cloudstream3.utils.VideoDownloadManager.KEY_RESUME_PACKAGES
|
||||||
|
|
||||||
|
|
||||||
open class PieFetchButton(context: Context, attributeSet: AttributeSet) :
|
open class PieFetchButton(context: Context, attributeSet: AttributeSet) :
|
||||||
|
@ -167,6 +170,7 @@ open class PieFetchButton(context: Context, attributeSet: AttributeSet) :
|
||||||
this.setPersistentId(card.id)
|
this.setPersistentId(card.id)
|
||||||
view.setOnClickListener {
|
view.setOnClickListener {
|
||||||
if (isZeroBytes) {
|
if (isZeroBytes) {
|
||||||
|
removeKey(KEY_RESUME_PACKAGES, card.id.toString())
|
||||||
callback(DownloadClickEvent(DOWNLOAD_ACTION_DOWNLOAD, card))
|
callback(DownloadClickEvent(DOWNLOAD_ACTION_DOWNLOAD, card))
|
||||||
//callback.invoke(DownloadClickEvent(DOWNLOAD_ACTION_DOWNLOAD, data))
|
//callback.invoke(DownloadClickEvent(DOWNLOAD_ACTION_DOWNLOAD, data))
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -187,7 +187,7 @@ object VideoDownloadManager {
|
||||||
private val DOWNLOAD_BAD_CONFIG =
|
private val DOWNLOAD_BAD_CONFIG =
|
||||||
DownloadStatus(retrySame = false, tryNext = false, success = false)
|
DownloadStatus(retrySame = false, tryNext = false, success = false)
|
||||||
|
|
||||||
private const val KEY_RESUME_PACKAGES = "download_resume"
|
const val KEY_RESUME_PACKAGES = "download_resume"
|
||||||
const val KEY_DOWNLOAD_INFO = "download_info"
|
const val KEY_DOWNLOAD_INFO = "download_info"
|
||||||
private const val KEY_RESUME_QUEUE_PACKAGES = "download_q_resume"
|
private const val KEY_RESUME_QUEUE_PACKAGES = "download_q_resume"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue