Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Haywood
VLC-Android
Commits
0407400d
Commit
0407400d
authored
2 years ago
by
Robert Stone
Committed by
Nicolas Pomepuy
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix playlist duration display
parent
478c4a5b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/vlc-android/src/org/videolan/vlc/util/Kextensions.kt
+5
-6
5 additions, 6 deletions
...tion/vlc-android/src/org/videolan/vlc/util/Kextensions.kt
with
5 additions
and
6 deletions
application/vlc-android/src/org/videolan/vlc/util/Kextensions.kt
+
5
−
6
View file @
0407400d
...
...
@@ -13,7 +13,6 @@ import android.text.SpannableString
import
android.text.style.DynamicDrawableSpan
import
android.text.style.ImageSpan
import
android.util.DisplayMetrics
import
android.util.Log
import
android.view.View
import
android.widget.TextView
import
androidx.annotation.WorkerThread
...
...
@@ -32,7 +31,6 @@ import com.google.android.material.snackbar.Snackbar
import
kotlinx.coroutines.*
import
kotlinx.coroutines.flow.Flow
import
kotlinx.coroutines.flow.collect
import
org.videolan.BuildConfig
import
org.videolan.libvlc.Media
import
org.videolan.libvlc.interfaces.IMedia
import
org.videolan.libvlc.util.AndroidUtil
...
...
@@ -50,7 +48,6 @@ import org.videolan.tools.AppScope
import
org.videolan.tools.isStarted
import
org.videolan.vlc.R
import
java.io.File
import
java.lang.StringBuilder
import
java.net.URI
import
java.net.URISyntaxException
import
java.security.SecureRandom
...
...
@@ -176,9 +173,11 @@ fun asyncTextItem(view: TextView, item: MediaLibraryItem?) {
view
.
visibility
=
View
.
GONE
return
}
val
text
=
if
(
item
is
Playlist
){
val
duration
=
if
(
item
.
duration
!=
0L
)
Tools
.
millisToString
(
item
.
duration
)
else
null
TextUtils
.
separatedString
(
view
.
context
.
getString
(
R
.
string
.
track_number
,
item
.
tracksCount
),
if
(
item
.
nbDurationUnknown
>
0
)
"$duration+"
else
duration
)
val
text
=
if
(
item
is
Playlist
)
{
if
(
item
.
duration
!=
0L
)
{
val
duration
=
Tools
.
millisToString
(
item
.
duration
)
TextUtils
.
separatedString
(
view
.
context
.
getString
(
R
.
string
.
track_number
,
item
.
tracksCount
),
if
(
item
.
nbDurationUnknown
>
0
)
"$duration+"
else
duration
)
}
else
view
.
context
.
getString
(
R
.
string
.
track_number
,
item
.
tracksCount
)
}
else
item
.
description
if
(
text
.
isNullOrEmpty
())
{
view
.
visibility
=
View
.
GONE
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment