subtitle, image, and extension page fixes

This commit is contained in:
Finnley Somdahl 2023-10-26 00:40:57 -05:00
parent 866bd3b3a9
commit 20bea76e6c
18 changed files with 895 additions and 670 deletions

View file

@ -11,7 +11,7 @@ import java.io.ObjectInputStream
import java.io.ObjectOutputStream
import java.io.Serializable
data class Track(val url: String, val lang: String)
data class Track(val url: String, val lang: String) : Serializable
open class Video(
val url: String = "",

View file

@ -108,8 +108,11 @@ internal class AnimeExtensionInstaller(private val context: Context) {
// Get the current download status
.map {
downloadManager.query(query).use { cursor ->
cursor.moveToFirst()
cursor.getInt(cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_STATUS))
if (cursor.moveToFirst()) {
cursor.getInt(cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_STATUS))
} else {
DownloadManager.STATUS_FAILED
}
}
}
// Ignore duplicate results