mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
debugging
This commit is contained in:
parent
8d772b8ad0
commit
a941f71e90
3 changed files with 12 additions and 4 deletions
|
@ -17,6 +17,7 @@ import com.lagradost.cloudstream3.isMovieType
|
|||
import com.lagradost.cloudstream3.mvvm.observe
|
||||
import com.lagradost.cloudstream3.ui.download.DownloadButtonSetup.handleDownloadClick
|
||||
import com.lagradost.cloudstream3.utils.AppUtils.loadResult
|
||||
import com.lagradost.cloudstream3.utils.Coroutines.main
|
||||
import com.lagradost.cloudstream3.utils.DOWNLOAD_EPISODE_CACHE
|
||||
import com.lagradost.cloudstream3.utils.DataStore
|
||||
import com.lagradost.cloudstream3.utils.UIHelper.fixPaddingStatusbar
|
||||
|
@ -44,9 +45,11 @@ class DownloadFragment : Fragment() {
|
|||
}
|
||||
|
||||
private fun setList(list: List<VisualDownloadHeaderCached>) {
|
||||
main {
|
||||
(download_list?.adapter as DownloadHeaderAdapter?)?.cardList = list
|
||||
download_list?.adapter?.notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
(download_list?.adapter as DownloadHeaderAdapter?)?.killAdapter()
|
||||
|
|
|
@ -34,7 +34,6 @@ class DownloadFileWorkManager(val context: Context, private val workerParams: Wo
|
|||
val info = applicationContext.getKey<VideoDownloadManager.DownloadInfo>(WORK_KEY_INFO, key)
|
||||
val pkg =
|
||||
applicationContext.getKey<VideoDownloadManager.DownloadResumePackage>(WORK_KEY_PACKAGE, key)
|
||||
println("INFO $info PKG ::: $pkg")
|
||||
if (info != null) {
|
||||
downloadEpisode(
|
||||
applicationContext,
|
||||
|
|
|
@ -1365,6 +1365,8 @@ object VideoDownloadManager {
|
|||
val info = context.getKey<DownloadedFileInfo>(KEY_DOWNLOAD_INFO, id.toString()) ?: return null
|
||||
val base = basePathToFile(context, info.basePath)
|
||||
|
||||
println("INFFOFOFOF $info ${base?.filePath} ")
|
||||
|
||||
if (isScopedStorage && base.isDownloadDir()) {
|
||||
val cr = context.contentResolver ?: return null
|
||||
val fileUri =
|
||||
|
@ -1373,7 +1375,11 @@ object VideoDownloadManager {
|
|||
if (fileLength == 0L) return null
|
||||
return DownloadedFileInfoResult(fileLength, info.totalBytes, fileUri)
|
||||
} else {
|
||||
|
||||
val file = base?.gotoDir(info.relativePath, false)?.findFile(info.displayName)
|
||||
println("ffffffile ${file?.filePath} ${file?.uri} $file ")
|
||||
|
||||
|
||||
// val normalPath = context.getNormalPath(getFile(info.relativePath), info.displayName)
|
||||
// val dFile = File(normalPath)
|
||||
|
||||
|
@ -1409,7 +1415,7 @@ object VideoDownloadManager {
|
|||
downloadStatusEvent.invoke(Pair(id, DownloadType.IsStopped))
|
||||
downloadDeleteEvent.invoke(id)
|
||||
val base = basePathToFile(context, info.basePath)
|
||||
|
||||
println("DOWNLOAD DIRRRR ----- ${base?.filePath} -------- ${info.relativePath} --------- ${info.displayName} -------- ${info.basePath} $")
|
||||
if (isScopedStorage && base.isDownloadDir()) {
|
||||
val cr = context.contentResolver ?: return false
|
||||
val fileUri =
|
||||
|
|
Loading…
Reference in a new issue