refactor: move buildconfig, bump ksp & better trailer scraping (#834)

This commit is contained in:
IndusAryan 2024-01-20 01:39:07 +05:30 committed by GitHub
parent bdef6524e7
commit 01f21e0fe8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 15 additions and 15 deletions

View file

@ -139,6 +139,10 @@ android {
abortOnError = false
checkReleaseBuilds = false
}
buildFeatures {
buildConfig = true
}
namespace = "com.lagradost.cloudstream3"
}
@ -195,13 +199,13 @@ dependencies {
// PlayBack
implementation("com.jaredrummler:colorpicker:1.1.0") // Subtitle Color Picker
implementation("com.github.recloudstream:media-ffmpeg:1.1.0") // Custom FF-MPEG Lib for Audio Codecs
implementation("com.github.teamnewpipe:NewPipeExtractor:eac850") /* For Trailers
implementation("com.github.teamnewpipe:NewPipeExtractor:6dc25f7") /* For Trailers
^ Update to Latest Commits if Trailers Misbehave, github.com/TeamNewPipe/NewPipeExtractor/commits/dev */
implementation("com.github.albfernandez:juniversalchardet:2.4.0") // Subtitle Decoding
// Crash Reports (AcraApplication.kt)
implementation("ch.acra:acra-core:5.11.2")
implementation("ch.acra:acra-toast:5.11.2")
implementation("ch.acra:acra-core:5.11.3")
implementation("ch.acra:acra-toast:5.11.3")
// UI Stuff
implementation("com.facebook.shimmer:shimmer:0.5.0") // Shimmering Effect (Loading Skeleton)

View file

@ -70,19 +70,18 @@ open class YoutubeExtractor : ExtractorApi() {
}
}
ytVideos[url]?.mapNotNull {
if (it.isVideoOnly || it.height <= 0) return@mapNotNull null
if (it.isVideoOnly() || it.height <= 0) return@mapNotNull null
ExtractorLink(
this.name,
this.name,
it.url ?: return@mapNotNull null,
it.content ?: return@mapNotNull null,
"",
it.height
)
}?.forEach(callback)
ytVideosSubtitles[url]?.mapNotNull {
SubtitleFile(it.languageTag ?: return@mapNotNull null, it.url ?: return@mapNotNull null)
SubtitleFile(it.languageTag ?: return@mapNotNull null, it.content ?: return@mapNotNull null)
}?.forEach(subtitleCallback)
}
}

View file

@ -184,9 +184,7 @@ object UIHelper {
try {
if (this is FragmentActivity) {
val navHostFragment = supportFragmentManager.findFragmentById(R.id.nav_host_fragment) as? NavHostFragment?
navHostFragment?.navController?.let {
it.navigate(navigation, arguments)
}
navHostFragment?.navController?.navigate(navigation, arguments)
}
} catch (t: Throwable) {
logError(t)