diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/download/DownloadAdapter.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/download/DownloadAdapter.kt
index 20458429..d211cb87 100644
--- a/app/src/main/java/com/lagradost/cloudstream3/ui/download/DownloadAdapter.kt
+++ b/app/src/main/java/com/lagradost/cloudstream3/ui/download/DownloadAdapter.kt
@@ -156,6 +156,16 @@ class DownloadAdapter(
card.child ?: return
downloadHeaderGotoChild.isVisible = false
+ val posDur = getViewPos(card.data.id)
+ downloadHeaderEpisodeProgress.apply {
+ isVisible = posDur != null
+ posDur?.let {
+ val visualPos = it.fixVisual()
+ max = (visualPos.duration / 1000).toInt()
+ progress = (visualPos.position / 1000).toInt()
+ }
+ }
+
val status = downloadButton.getStatus(card.child.id, card.currentBytes, card.totalBytes)
if (status == DownloadStatusTell.IsDone) {
// We do this here instead if we are finished downloading
@@ -205,6 +215,7 @@ class DownloadAdapter(
formattedSize: String
) {
downloadButton.isVisible = false
+ downloadHeaderEpisodeProgress.isVisible = false
downloadHeaderGotoChild.isVisible = !isMultiDeleteState
try {
@@ -218,7 +229,7 @@ class DownloadAdapter(
formattedSize
)
} catch (e: Exception) {
- downloadHeaderInfo.text = ""
+ downloadHeaderInfo.text = null
logError(e)
}
diff --git a/app/src/main/res/layout/download_header_episode.xml b/app/src/main/res/layout/download_header_episode.xml
index 957869d4..385fb2e0 100644
--- a/app/src/main/res/layout/download_header_episode.xml
+++ b/app/src/main/res/layout/download_header_episode.xml
@@ -14,6 +14,17 @@
app:cardBackgroundColor="?attr/boxItemBackground"
app:cardCornerRadius="@dimen/rounded_image_radius">
+
+