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" applicationId "com.lagradost.cloudstream3"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 31 targetSdkVersion 31
versionCode 27 versionCode 28
versionName "1.9.12" versionName "2.0.0"
resValue "string", "app_version", resValue "string", "app_version",
"${defaultConfig.versionName}${versionNameSuffix ?: ""}" "${defaultConfig.versionName}${versionNameSuffix ?: ""}"

View file

@ -1392,6 +1392,7 @@ class PlayerFragment : Fragment() {
val subsSettings = sourceDialog.findViewById<View>(R.id.subs_settings)!! val subsSettings = sourceDialog.findViewById<View>(R.id.subs_settings)!!
subsSettings.setOnClickListener { subsSettings.setOnClickListener {
saveArguments()
SubtitlesFragment.push(activity) SubtitlesFragment.push(activity)
sourceDialog.dismiss() sourceDialog.dismiss()
} }
@ -1564,7 +1565,6 @@ class PlayerFragment : Fragment() {
private var isCurrentlySkippingEp = false private var isCurrentlySkippingEp = false
fun tryNextMirror() { fun tryNextMirror() {
val urls = getUrls() val urls = getUrls()
val current = getCurrentUrl() val current = getCurrentUrl()
@ -1637,7 +1637,6 @@ class PlayerFragment : Fragment() {
} }
override fun onDestroy() { override fun onDestroy() {
/* val lp = activity?.window?.attributes /* 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) { override fun onSaveInstanceState(outState: Bundle) {
savePos() savePos()

View file

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

View file

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

View file

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