Merge branch 'dev' of https://github.com/rebelonion/Dantotsu into dev
This commit is contained in:
commit
2b79d437fc
5 changed files with 73 additions and 52 deletions
|
@ -95,8 +95,30 @@ class MediaInfoFragment : Fragment() {
|
|||
binding.mediaInfoStart.text = media.startDate?.toString() ?: "??"
|
||||
binding.mediaInfoEnd.text = media.endDate?.toString() ?: "??"
|
||||
if (media.anime != null) {
|
||||
binding.mediaInfoDuration.text =
|
||||
if (media.anime.episodeDuration != null) media.anime.episodeDuration.toString() else "??"
|
||||
val episodeDuration = media.anime.episodeDuration
|
||||
|
||||
binding.mediaInfoDuration.text = when {
|
||||
episodeDuration != null -> {
|
||||
val hours = episodeDuration / 60
|
||||
val minutes = episodeDuration % 60
|
||||
|
||||
val formattedDuration = buildString {
|
||||
if (hours > 0) {
|
||||
append("$hours hour")
|
||||
if (hours > 1) append("s")
|
||||
}
|
||||
|
||||
if (minutes > 0) {
|
||||
if (hours > 0) append(", ")
|
||||
append("$minutes min")
|
||||
if (minutes > 1) append("s")
|
||||
}
|
||||
}
|
||||
|
||||
formattedDuration
|
||||
}
|
||||
else -> "??"
|
||||
}
|
||||
binding.mediaInfoDurationContainer.visibility = View.VISIBLE
|
||||
binding.mediaInfoSeasonContainer.visibility = View.VISIBLE
|
||||
binding.mediaInfoSeason.text =
|
||||
|
|
|
@ -1598,7 +1598,7 @@ class ExoplayerView : AppCompatActivity(), Player.Listener, SessionAvailabilityL
|
|||
|
||||
aspectRatio = Rational(width, height)
|
||||
|
||||
videoInfo.text = "$width x $height"
|
||||
videoInfo.text = "Quality: ${height}p"
|
||||
|
||||
if (exoPlayer.duration < playbackPosition)
|
||||
exoPlayer.seekTo(0)
|
||||
|
|
|
@ -180,16 +180,6 @@
|
|||
app:tint="#fff"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck" />
|
||||
|
||||
|
||||
<ImageButton
|
||||
android:id="@id/exo_playback_speed"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:backgroundTint="#00FFFFFF"
|
||||
android:src="@drawable/ic_round_slow_motion_video_24"
|
||||
app:tint="#fff"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/exo_screen"
|
||||
android:layout_width="48dp"
|
||||
|
@ -319,18 +309,13 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/exo_back"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_width="43dp"
|
||||
android:layout_height="match_parent"
|
||||
android:backgroundTint="#00FFFFFF"
|
||||
android:src="@drawable/ic_round_arrow_back_ios_new_24"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
@ -362,7 +347,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="48dp"
|
||||
android:alpha="0.66"
|
||||
android:alpha="0.75"
|
||||
android:fontFamily="@font/poppins"
|
||||
android:singleLine="false"
|
||||
android:textColor="@color/bg_white"
|
||||
|
@ -372,31 +357,52 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/exo_lock"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:backgroundTint="#00FFFFFF"
|
||||
app:tint="@color/bg_white"
|
||||
app:srcCompat="@drawable/ic_round_lock_open_24"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck" />
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="-6dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exo_video_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:alpha="0.58"
|
||||
android:textAlignment="textEnd"
|
||||
android:textColor="@color/bg_white"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="TextContrastCheck"
|
||||
tools:text="720x1080" />
|
||||
<ImageButton
|
||||
android:id="@id/exo_playback_speed"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:backgroundTint="#00FFFFFF"
|
||||
android:src="@drawable/ic_round_slow_motion_video_24"
|
||||
app:tint="#fff"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/exo_lock"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:backgroundTint="#00FFFFFF"
|
||||
app:tint="@color/bg_white"
|
||||
app:srcCompat="@drawable/ic_round_lock_open_24"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exo_video_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:alpha="0.75"
|
||||
android:textAlignment="textEnd"
|
||||
android:textColor="@color/bg_white"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="TextContrastCheck"
|
||||
tools:text="720x1080" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -145,13 +145,6 @@
|
|||
android:layout_weight="1"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:textAlignment="textEnd" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:text="@string/min"
|
||||
android:textAlignment="textEnd" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
|
@ -383,4 +376,4 @@
|
|||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
|
|
@ -153,7 +153,7 @@
|
|||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:id="@+id/animeSourceDubbed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue