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
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ dependencies {

// AY -->
// mpv-android
implementation(aniyomilibs.aniyomi.mpv)
implementation(aniyomilibs.mpv.lib)

// FFmpeg-kit
implementation(aniyomilibs.ffmpeg.kit)
Expand Down
2 changes: 1 addition & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
-keep,allowoptimization class app.cash.quickjs.** { public protected *; }
-keep,allowoptimization class uy.kohesive.injekt.** { public protected *; }
# AY -->
-keep,allowoptimization class is.xyz.mpv.** { public protected *; }
-keep,allowoptimization class is.xyz.mpv.** { *; }
-keep,allowoptimization class com.arthenica.** { public protected *; }
# <-- AY

Expand Down
3 changes: 3 additions & 0 deletions app/src/main/assets/aniyomi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ end
function aniyomi.int_picker(title, name_format, start, stop, step, property)
mp.set_property("user-data/aniyomi/launch_int_picker", title .. "|" .. name_format .. "|" .. start .. "|" .. stop .. "|" .. step .. "|" .. property)
end
function aniyomi.show_seek_text(value, text)
mp.set_property("user-data/aniyomi/show_seek_text", tostring(value) .. "|" .. text)
end
-- Legacy
function aniyomi.left_seek_by(value)
aniyomi.seek_by(-value)
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/eu/kanade/domain/DomainModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import eu.kanade.domain.track.interactor.AddTracks
import eu.kanade.domain.track.interactor.RefreshTracks
import eu.kanade.domain.track.interactor.SyncEpisodeProgressWithTrack
import eu.kanade.domain.track.interactor.TrackEpisode
import eu.kanade.tachiyomi.ui.player.utils.TrackSelect
import eu.kanade.tachiyomi.ui.player.domain.TrackSelect
import mihon.data.repository.ExtensionRepoRepositoryImpl
import mihon.domain.episode.interactor.FilterEpisodesForDownload
import mihon.domain.extensionrepo.interactor.CreateExtensionRepo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ object PlayerSettingsDecoderScreen : SearchableSettings {

val tryHw = decoderPreferences.tryHWDecoding()
val useGpuNext = decoderPreferences.gpuNext()
val debanding = decoderPreferences.videoDebanding()
val debanding = decoderPreferences.debanding()
val yuv420p = decoderPreferences.useYUV420P()

return listOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import kotlinx.collections.immutable.persistentListOf
import kotlinx.collections.immutable.persistentMapOf
import kotlinx.collections.immutable.toPersistentMap
import tachiyomi.i18n.MR
import tachiyomi.i18n.animiru.AMMR
import tachiyomi.i18n.aniyomi.AYMR
import tachiyomi.presentation.core.i18n.stringResource
import tachiyomi.presentation.core.util.collectAsState
Expand Down Expand Up @@ -63,6 +64,10 @@ object PlayerSettingsPlayerScreen : SearchableSettings {
preference = playerPreferences.preserveWatchingPosition(),
title = stringResource(AYMR.strings.pref_preserve_watching_position),
),
Preference.PreferenceItem.SwitchPreference(
preference = playerPreferences.switchOnFailure(),
title = stringResource(AMMR.strings.player_pref_switch_on_failure),
),
Preference.PreferenceItem.ListPreference(
preference = playerPreferences.defaultPlayerOrientationType(),
entries = PlayerOrientation.entries.associateWith {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,21 +146,3 @@ sealed interface CustomButtonScreenState {
get() = customButtons.isEmpty()
}
}

sealed interface CustomButtonFetchState {
@Immutable
data object Loading : CustomButtonFetchState

@Immutable
data class Success(val customButtons: ImmutableList<CustomButton>) : CustomButtonFetchState

@Immutable
data class Error(val errorMessage: String) : CustomButtonFetchState
}

fun CustomButtonFetchState.getButtons(): ImmutableList<CustomButton> {
return when (this) {
is CustomButtonFetchState.Success -> this.customButtons
else -> emptyList<CustomButton>().toImmutableList()
}
}
7 changes: 7 additions & 0 deletions app/src/main/java/eu/kanade/tachiyomi/di/AppModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import eu.kanade.tachiyomi.network.JavaScriptEngine
import eu.kanade.tachiyomi.network.NetworkHelper
import eu.kanade.tachiyomi.source.AndroidSourceManager
import eu.kanade.tachiyomi.ui.player.ExternalIntents
import eu.kanade.tachiyomi.ui.player.domain.AudioManager
import eu.kanade.tachiyomi.ui.player.domain.BrightnessManager
import io.requery.android.database.sqlite.RequerySQLiteOpenHelperFactory
import kotlinx.serialization.json.Json
import kotlinx.serialization.protobuf.ProtoBuf
Expand Down Expand Up @@ -164,6 +166,11 @@ class AppModule(val app: Application) : InjektModule {
addSingletonFactory { GoogleDriveService(app) }
// <-- AM (SYNC_DRIVE)

// AM -->
addSingletonFactory { AudioManager(app) }
addSingletonFactory { BrightnessManager(app) }
// <-- AM

// Asynchronously init expensive components for a faster cold start
ContextCompat.getMainExecutor(app).execute {
get<NetworkHelper>()
Expand Down
Loading