Merge branch 'dev' of https://github.com/rebelonion/Dantotsu into dev
This commit is contained in:
commit
160f783c6d
4 changed files with 50 additions and 14 deletions
4
.github/workflows/beta.yml
vendored
4
.github/workflows/beta.yml
vendored
|
@ -21,7 +21,7 @@ jobs:
|
||||||
|
|
||||||
|
|
||||||
- name: Download last SHA artifact
|
- name: Download last SHA artifact
|
||||||
uses: actions/download-artifact@v4.1.2
|
uses: dawidd6/action-download-artifact@v3
|
||||||
with:
|
with:
|
||||||
workflow: beta.yml
|
workflow: beta.yml
|
||||||
name: last-sha
|
name: last-sha
|
||||||
|
@ -92,7 +92,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
#Discord
|
#Discord
|
||||||
commit_messages=$(echo "$COMMIT_LOG" | sed 's/%0A/\n/g')
|
commit_messages=$(echo "$COMMIT_LOG" | sed 's/%0A/\n/g; s/^/\n/')
|
||||||
# Truncate commit messages if they are too long
|
# Truncate commit messages if they are too long
|
||||||
max_length=1900 # Adjust this value as needed
|
max_length=1900 # Adjust this value as needed
|
||||||
if [ ${#commit_messages} -gt $max_length ]; then
|
if [ ${#commit_messages} -gt $max_length ]; then
|
||||||
|
|
|
@ -61,6 +61,7 @@ import androidx.media3.exoplayer.util.EventLogger
|
||||||
import androidx.media3.session.MediaSession
|
import androidx.media3.session.MediaSession
|
||||||
import androidx.media3.ui.*
|
import androidx.media3.ui.*
|
||||||
import androidx.media3.ui.CaptionStyleCompat.*
|
import androidx.media3.ui.CaptionStyleCompat.*
|
||||||
|
import androidx.media3.exoplayer.DefaultLoadControl
|
||||||
import androidx.mediarouter.app.MediaRouteButton
|
import androidx.mediarouter.app.MediaRouteButton
|
||||||
import ani.dantotsu.*
|
import ani.dantotsu.*
|
||||||
import ani.dantotsu.R
|
import ani.dantotsu.R
|
||||||
|
@ -1448,10 +1449,26 @@ class ExoplayerView : AppCompatActivity(), Player.Listener, SessionAvailabilityL
|
||||||
|
|
||||||
private fun buildExoplayer() {
|
private fun buildExoplayer() {
|
||||||
//Player
|
//Player
|
||||||
|
val DEFAULT_MIN_BUFFER_MS = 600000
|
||||||
|
val DEFAULT_MAX_BUFFER_MS = 600000
|
||||||
|
val BUFFER_FOR_PLAYBACK_MS = 2500
|
||||||
|
val BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS = 5000
|
||||||
|
|
||||||
|
val loadControl = DefaultLoadControl.Builder()
|
||||||
|
.setBackBuffer(1000 * 60 * 2, true)
|
||||||
|
.setBufferDurationsMs(
|
||||||
|
DEFAULT_MIN_BUFFER_MS,
|
||||||
|
DEFAULT_MAX_BUFFER_MS,
|
||||||
|
BUFFER_FOR_PLAYBACK_MS,
|
||||||
|
BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
|
||||||
hideSystemBars()
|
hideSystemBars()
|
||||||
exoPlayer = ExoPlayer.Builder(this)
|
exoPlayer = ExoPlayer.Builder(this)
|
||||||
.setMediaSourceFactory(DefaultMediaSourceFactory(cacheFactory))
|
.setMediaSourceFactory(DefaultMediaSourceFactory(cacheFactory))
|
||||||
.setTrackSelector(trackSelector)
|
.setTrackSelector(trackSelector)
|
||||||
|
.setLoadControl(loadControl)
|
||||||
.build().apply {
|
.build().apply {
|
||||||
playWhenReady = true
|
playWhenReady = true
|
||||||
this.playbackParameters = this@ExoplayerView.playbackParameters
|
this.playbackParameters = this@ExoplayerView.playbackParameters
|
||||||
|
|
|
@ -6,9 +6,12 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import ani.dantotsu.R
|
import ani.dantotsu.R
|
||||||
import ani.dantotsu.connections.comments.Comment
|
import ani.dantotsu.connections.comments.Comment
|
||||||
import ani.dantotsu.connections.comments.CommentsAPI
|
import ani.dantotsu.connections.comments.CommentsAPI
|
||||||
|
import ani.dantotsu.copyToClipboard
|
||||||
import ani.dantotsu.currActivity
|
import ani.dantotsu.currActivity
|
||||||
import ani.dantotsu.databinding.ItemCommentsBinding
|
import ani.dantotsu.databinding.ItemCommentsBinding
|
||||||
import ani.dantotsu.loadImage
|
import ani.dantotsu.loadImage
|
||||||
|
import ani.dantotsu.openLinkInBrowser
|
||||||
|
import ani.dantotsu.others.ImageViewDialog
|
||||||
import ani.dantotsu.snackString
|
import ani.dantotsu.snackString
|
||||||
import com.xwray.groupie.GroupieAdapter
|
import com.xwray.groupie.GroupieAdapter
|
||||||
import com.xwray.groupie.Section
|
import com.xwray.groupie.Section
|
||||||
|
@ -53,9 +56,11 @@ class CommentItem(val comment: Comment,
|
||||||
viewBinding.commentEdit.visibility = if (isUserComment) View.VISIBLE else View.GONE
|
viewBinding.commentEdit.visibility = if (isUserComment) View.VISIBLE else View.GONE
|
||||||
if ((comment.replyCount ?: 0) > 0) {
|
if ((comment.replyCount ?: 0) > 0) {
|
||||||
viewBinding.commentTotalReplies.visibility = View.VISIBLE
|
viewBinding.commentTotalReplies.visibility = View.VISIBLE
|
||||||
|
viewBinding.commentRepliesDivider.visibility = View.VISIBLE
|
||||||
viewBinding.commentTotalReplies.text = "View ${comment.replyCount} repl${if (comment.replyCount == 1) "y" else "ies"}"
|
viewBinding.commentTotalReplies.text = "View ${comment.replyCount} repl${if (comment.replyCount == 1) "y" else "ies"}"
|
||||||
} else {
|
} else {
|
||||||
viewBinding.commentTotalReplies.visibility = View.GONE
|
viewBinding.commentTotalReplies.visibility = View.GONE
|
||||||
|
viewBinding.commentRepliesDivider.visibility = View.GONE
|
||||||
}
|
}
|
||||||
viewBinding.commentReply.visibility = View.VISIBLE
|
viewBinding.commentReply.visibility = View.VISIBLE
|
||||||
viewBinding.commentTotalReplies.setOnClickListener {
|
viewBinding.commentTotalReplies.setOnClickListener {
|
||||||
|
|
|
@ -186,7 +186,19 @@
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/commentRepliesDivider"
|
||||||
|
android:layout_width="32dp"
|
||||||
|
android:layout_height="3dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginStart="44dp"
|
||||||
|
android:background="@color/nav_tab" />
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/commentTotalReplies"
|
android:id="@+id/commentTotalReplies"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -198,6 +210,8 @@
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:ignore="HardcodedText" />
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/commentRepliesList"
|
android:id="@+id/commentRepliesList"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue