Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -533,17 +533,13 @@ dependencies {
// decoders remain as automatic fallbacks.
implementation("org.jellyfin.media3:media3-ffmpeg-decoder:1.9.0+1")

// NIO also backports NewPipe's URL encoder/decoder overloads below API 33.
// Backports java.time / NIO APIs below API 33.
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs_nio:2.0.4")

// Low-latency native output. Version 1.10 remains API-compatible with the
// requested Oboe 1.8+ baseline and exposes its CMake target through Prefab.
implementation("com.google.oboe:oboe:1.10.0")

// Metadata/search remains local InnerTube/NewPipe functionality; playback
// resolves through InnerTubeX first and retains NewPipe as a fallback.
implementation(libs.newpipe.extractor)

// InnerTubeX is invoked through the compatibility adapter because its
// current release is built with a newer Kotlin metadata version than the
// app. Runtime-only keeps the app compiler on its existing Kotlin line.
Expand Down
17 changes: 1 addition & 16 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,10 @@
-keep class * extends androidx.glance.appwidget.GlanceAppWidgetReceiver { *; }
-keep class com.lastwave.app.widget.** { *; }

# NewPipe's YouTube extractor loads service implementations and its
# JavaScript deobfuscation engine dynamically.
-keep class org.schabi.newpipe.extractor.** { *; }
-dontwarn org.schabi.newpipe.extractor.**
# HTML parsing used by Genius lyrics / sanitizer
-keep class org.jsoup.** { *; }
-dontwarn org.jsoup.**
-dontwarn java.beans.**
# NewPipe's JS engine (Rhino) resolves classes by name at runtime
# (Context.getRegExpProxy() → org.mozilla.javascript.regexp.RegExpImpl,
# Context.createInterpreter, script compilation) and the jar bundles no
# consumer R8 rules. Under shrinking the release path silently loses the
# player-JS deobfuscation (the unminified rawRelease hides this). Keep the
# whole engine plus ClassFileWriter, which is instantiated reflectively for
# compiled scripts.
-keep class org.mozilla.javascript.** { *; }
-keep class org.mozilla.classfile.ClassFileWriter { *; }
-dontwarn org.mozilla.javascript.**
-dontwarn org.mozilla.classfile.**
-dontwarn javax.script.**

# InnerTubeX is reached through the Kotlin-compatibility reflection boundary;
# retain its public constructors/models and the selected Ktor engine in release
Expand Down
6 changes: 1 addition & 5 deletions app/src/main/java/com/lastwave/app/LastWaveApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class LastWaveApplication : Application(), ImageLoaderFactory {
@Inject lateinit var themeRepository: dagger.Lazy<ThemeRepository>
@Inject lateinit var applicationScope: CoroutineScope
@Inject lateinit var okHttpClient: dagger.Lazy<okhttp3.OkHttpClient>
@Inject lateinit var streamExtractor: dagger.Lazy<com.lastwave.app.data.music.YouTubeStreamExtractor>
@Inject lateinit var innerTubeMusicApi: dagger.Lazy<com.lastwave.app.data.music.InnerTubeMusicApi>
@Inject lateinit var ytMusicSyncManager: dagger.Lazy<com.lastwave.app.data.ytmusic.YtMusicSyncManager>
@Inject lateinit var ytMusicHistorySyncManager: dagger.Lazy<com.lastwave.app.data.ytmusic.YtMusicHistorySyncManager>
Expand Down Expand Up @@ -78,7 +77,7 @@ class LastWaveApplication : Application(), ImageLoaderFactory {
// On-demand lyric translation/romanization keeps its bounded result
// cache under the app cache directory so Android may reclaim it.
runCatching { com.lastwave.app.data.lyrics.LyricsTranslation.cacheDir = cacheDir }
// First-song OPUS warmup: visitorData + NewPipe + BotGuard must be
// First-song OPUS warmup: visitorData + BotGuard must be
// ready before the first tap, not 2.5s after. Immediate and never
// throws; the delayed block below keeps the rest lazy.
// Duplicate launcher icons after an update or icon change: make sure only
Expand All @@ -87,9 +86,6 @@ class LastWaveApplication : Application(), ImageLoaderFactory {
runCatching { themeRepository.get().reconcileAppIcon() }
}
applicationScope.launch(Dispatchers.IO) {
// NewPipe is optional fallback infrastructure. A broken extractor
// install must not escape an application-scope coroutine.
runCatching { streamExtractor.get().preWarm() }
// Warm the InnerTube web config (visitor data) so the first
// playback's direct-URL fast path can attach it immediately.
runCatching { innerTubeMusicApi.get().preWarmPlayback() }
Expand Down
292 changes: 75 additions & 217 deletions app/src/main/java/com/lastwave/app/data/music/InnerTubeMusicApi.kt

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading
Loading