[fix] Offline mode display exception

This commit is contained in:
acite
2025-09-28 01:54:02 +08:00
parent 9bad0dcbc2
commit 2166229923
4 changed files with 16 additions and 8 deletions

View File

@@ -36,7 +36,7 @@ import javax.inject.Singleton
@HiltViewModel
class VideoScreenViewModel @Inject constructor(
private val fetchManager: FetchManager,
val fetchManager: FetchManager,
@ApplicationContext val context: Context,
val mediaManager: MediaManager,
val recentManager: RecentManager,
@@ -82,7 +82,9 @@ class VideoScreenViewModel @Inject constructor(
videoLibrary.classesMap["Offline"] = mutableStateListOf<Video>()
val downloaded = fetchManager.getAllDownloadsAsync().filter {
it.status == Status.COMPLETED && it.extras.getString("class", "") != "comic"
it.status == Status.COMPLETED &&
it.extras.getString("class", "") != "comic" &&
it.extras.getString("type", "") == "main"
}
val jsonQuery = downloaded.map{ File(