Skip to content

Commit

Permalink
Add support for h.264 and Matroska formats
Browse files Browse the repository at this point in the history
  • Loading branch information
Luna712 authored Jul 22, 2024
1 parent 819acdc commit b930944
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions InternetArchiveProvider/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// use an integer for version numbers
version = 3
version = 4


cloudstream {
Expand All @@ -22,4 +22,4 @@ cloudstream {
// https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html
tvTypes = listOf("Others")
iconUrl = "https://www.google.com/s2/favicons?domain=archive.org&sz=%size%"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,11 @@ class InternetArchiveProvider : MainAPI() {

suspend fun toLoadResponse(provider: InternetArchiveProvider): LoadResponse {
val videoFiles = files.asSequence()
.filter { it.source == "original" && it.format.startsWith("MPEG4", true) }
.toList()
.filter { it.source == "original" &&
(it.format.startsWith("MPEG4", true) ||
it.format.startsWith("H.264", true) ||
it.format.startsWith("Matroska", true))
}.toList()

val fileUrls = videoFiles.asSequence()
.map { "${provider.mainUrl}$dir/${it.name}" }
Expand Down Expand Up @@ -309,4 +312,4 @@ class InternetArchiveProvider : MainAPI() {
}
}
}
}
}

0 comments on commit b930944

Please sign in to comment.