small fixes

This commit is contained in:
LagradOst 2021-10-10 23:46:51 +02:00
parent 86e87fdef2
commit 5048bc5368
5 changed files with 20 additions and 4 deletions

View file

@ -34,8 +34,8 @@ android {
applicationId "com.lagradost.cloudstream3"
minSdkVersion 21
targetSdkVersion 31
versionCode 27
versionName "1.9.12"
versionCode 28
versionName "2.0.0"
resValue "string", "app_version",
"${defaultConfig.versionName}${versionNameSuffix ?: ""}"

View file

@ -1392,6 +1392,7 @@ class PlayerFragment : Fragment() {
val subsSettings = sourceDialog.findViewById<View>(R.id.subs_settings)!!
subsSettings.setOnClickListener {
saveArguments()
SubtitlesFragment.push(activity)
sourceDialog.dismiss()
}
@ -1564,7 +1565,6 @@ class PlayerFragment : Fragment() {
private var isCurrentlySkippingEp = false
fun tryNextMirror() {
val urls = getUrls()
val current = getCurrentUrl()
@ -1637,7 +1637,6 @@ class PlayerFragment : Fragment() {
}
override fun onDestroy() {
/* val lp = activity?.window?.attributes
@ -1689,6 +1688,20 @@ class PlayerFragment : Fragment() {
}
}
private fun saveArguments() {
if (this::exoPlayer.isInitialized) {
arguments?.putInt(STATE_RESUME_WINDOW, exoPlayer.currentWindowIndex)
arguments?.putLong(STATE_RESUME_POSITION, exoPlayer.currentPosition)
}
arguments?.putBoolean(STATE_PLAYER_FULLSCREEN, isFullscreen)
arguments?.putBoolean(STATE_PLAYER_PLAYING, isPlayerPlaying)
arguments?.putInt(RESIZE_MODE_KEY, resizeMode)
arguments?.putFloat(PLAYBACK_SPEED, playbackSpeed)
if (!isDownloadedFile) {
arguments?.putString("data", mapper.writeValueAsString(playerData))
}
}
override fun onSaveInstanceState(outState: Bundle) {
savePos()

View file

@ -29,6 +29,7 @@
android:layout_height="5dp">
</androidx.core.widget.ContentLoadingProgressBar>
<GridLayout
android:foreground="?android:attr/selectableItemBackgroundBorderless"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView

View file

@ -12,6 +12,7 @@
android:layout_marginBottom="10dp"
>
<LinearLayout
android:foreground="?android:attr/selectableItemBackgroundBorderless"
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_height="wrap_content">

View file

@ -51,6 +51,7 @@
android:layout_height="5dp">
</androidx.core.widget.ContentLoadingProgressBar>
<LinearLayout
android:foreground="?android:attr/selectableItemBackgroundBorderless"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView