mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 23:51:21 +02:00
Temporarily restore ExoPlayer as the default player (#797)
## Description Due a few more MPV bugs showing up, this PR reverts the part of #736 that made "Prefer MPV" the default player option. User can still manually switch to "Prefer MPV" and its full functional remains. It's just not set to be the default anymore.
This commit is contained in:
parent
fa51d1e61e
commit
abd8235556
2 changed files with 8 additions and 12 deletions
|
|
@ -746,7 +746,7 @@ sealed interface AppPreference<Pref, T> {
|
||||||
val PlayerBackendPref =
|
val PlayerBackendPref =
|
||||||
AppChoicePreference<AppPreferences, PlayerBackend>(
|
AppChoicePreference<AppPreferences, PlayerBackend>(
|
||||||
title = R.string.player_backend,
|
title = R.string.player_backend,
|
||||||
defaultValue = PlayerBackend.PREFER_MPV,
|
defaultValue = PlayerBackend.EXO_PLAYER,
|
||||||
getter = { it.playbackPreferences.playerBackend },
|
getter = { it.playbackPreferences.playerBackend },
|
||||||
setter = { prefs, value ->
|
setter = { prefs, value ->
|
||||||
prefs.updatePlaybackPreferences { playerBackend = value }
|
prefs.updatePlaybackPreferences { playerBackend = value }
|
||||||
|
|
|
||||||
|
|
@ -2,26 +2,21 @@ package com.github.damontecres.wholphin.services
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.widget.Toast
|
|
||||||
import androidx.core.content.edit
|
import androidx.core.content.edit
|
||||||
import androidx.datastore.core.DataStore
|
import androidx.datastore.core.DataStore
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
import com.github.damontecres.wholphin.R
|
|
||||||
import com.github.damontecres.wholphin.WholphinApplication
|
import com.github.damontecres.wholphin.WholphinApplication
|
||||||
import com.github.damontecres.wholphin.preferences.AppPreference
|
import com.github.damontecres.wholphin.preferences.AppPreference
|
||||||
import com.github.damontecres.wholphin.preferences.AppPreferences
|
import com.github.damontecres.wholphin.preferences.AppPreferences
|
||||||
import com.github.damontecres.wholphin.preferences.PlayerBackend
|
|
||||||
import com.github.damontecres.wholphin.preferences.update
|
import com.github.damontecres.wholphin.preferences.update
|
||||||
import com.github.damontecres.wholphin.preferences.updateAdvancedPreferences
|
import com.github.damontecres.wholphin.preferences.updateAdvancedPreferences
|
||||||
import com.github.damontecres.wholphin.preferences.updateInterfacePreferences
|
import com.github.damontecres.wholphin.preferences.updateInterfacePreferences
|
||||||
import com.github.damontecres.wholphin.preferences.updateLiveTvPreferences
|
import com.github.damontecres.wholphin.preferences.updateLiveTvPreferences
|
||||||
import com.github.damontecres.wholphin.preferences.updateMpvOptions
|
import com.github.damontecres.wholphin.preferences.updateMpvOptions
|
||||||
import com.github.damontecres.wholphin.preferences.updatePlaybackOverrides
|
import com.github.damontecres.wholphin.preferences.updatePlaybackOverrides
|
||||||
import com.github.damontecres.wholphin.preferences.updatePlaybackPreferences
|
|
||||||
import com.github.damontecres.wholphin.preferences.updateSubtitlePreferences
|
import com.github.damontecres.wholphin.preferences.updateSubtitlePreferences
|
||||||
import com.github.damontecres.wholphin.ui.preferences.PreferencesViewModel
|
import com.github.damontecres.wholphin.ui.preferences.PreferencesViewModel
|
||||||
import com.github.damontecres.wholphin.ui.preferences.subtitle.SubtitleSettings
|
import com.github.damontecres.wholphin.ui.preferences.subtitle.SubtitleSettings
|
||||||
import com.github.damontecres.wholphin.ui.showToast
|
|
||||||
import com.github.damontecres.wholphin.util.Version
|
import com.github.damontecres.wholphin.util.Version
|
||||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
|
|
@ -203,12 +198,13 @@ suspend fun upgradeApp(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (previous.isEqualOrBefore(Version.fromString("0.4.0-1-g0"))) {
|
// TODO temporarily disabled until some MPV bugs are fixed
|
||||||
appPreferences.updateData {
|
// if (previous.isEqualOrBefore(Version.fromString("0.4.0-1-g0"))) {
|
||||||
it.updatePlaybackPreferences { playerBackend = PlayerBackend.PREFER_MPV }
|
// appPreferences.updateData {
|
||||||
}
|
// it.updatePlaybackPreferences { playerBackend = PlayerBackend.PREFER_MPV }
|
||||||
showToast(context, context.getString(R.string.upgrade_mpv_toast), Toast.LENGTH_LONG)
|
// }
|
||||||
}
|
// showToast(context, context.getString(R.string.upgrade_mpv_toast), Toast.LENGTH_LONG)
|
||||||
|
// }
|
||||||
|
|
||||||
if (previous.isEqualOrBefore(Version.fromString("0.4.0-2-g0"))) {
|
if (previous.isEqualOrBefore(Version.fromString("0.4.0-2-g0"))) {
|
||||||
appPreferences.updateData {
|
appPreferences.updateData {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue