fix: exoplayer initialization
This commit is contained in:
parent
865b96a219
commit
386e02a564
3 changed files with 6 additions and 3 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -31,3 +31,6 @@ output.json
|
||||||
|
|
||||||
#other
|
#other
|
||||||
scripts/
|
scripts/
|
||||||
|
|
||||||
|
#crowdin
|
||||||
|
crowdin.yml
|
|
@ -1570,7 +1570,8 @@ class ExoplayerView : AppCompatActivity(), Player.Listener, SessionAvailabilityL
|
||||||
}
|
}
|
||||||
}.show()
|
}.show()
|
||||||
dialog.window?.setDimAmount(0.8f)
|
dialog.window?.setDimAmount(0.8f)
|
||||||
} else buildExoplayer()
|
}
|
||||||
|
if (!this::exoPlayer.isInitialized) buildExoplayer()
|
||||||
|
|
||||||
val isDisabled = (subtitle == null && hasExtSubtitles)
|
val isDisabled = (subtitle == null && hasExtSubtitles)
|
||||||
exoPlayer.trackSelectionParameters = exoPlayer.trackSelectionParameters
|
exoPlayer.trackSelectionParameters = exoPlayer.trackSelectionParameters
|
||||||
|
|
|
@ -47,7 +47,6 @@ class SettingsAddonActivity : AppCompatActivity() {
|
||||||
private val downloadAddonManager: DownloadAddonManager = Injekt.get()
|
private val downloadAddonManager: DownloadAddonManager = Injekt.get()
|
||||||
private val torrentAddonManager: TorrentAddonManager = Injekt.get()
|
private val torrentAddonManager: TorrentAddonManager = Injekt.get()
|
||||||
|
|
||||||
@OptIn(DelicateCoroutinesApi::class)
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
ThemeManager(this).applyTheme()
|
ThemeManager(this).applyTheme()
|
||||||
|
@ -193,7 +192,7 @@ class SettingsAddonActivity : AppCompatActivity() {
|
||||||
Injekt.get<TorrentAddonManager>().extension?.let {
|
Injekt.get<TorrentAddonManager>().extension?.let {
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
lifecycleScope.launchIO {
|
lifecycleScope.launchIO {
|
||||||
if (!ServerService.isRunning()) {
|
if (!ServerService.isRunning() && torrentAddonManager.isAvailable()) {
|
||||||
ServerService.start()
|
ServerService.start()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue