mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-03 17:44:51 +02:00
Fix:Android get track offset out of bounds crash
This commit is contained in:
parent
40b731534c
commit
62376871e3
1 changed files with 1 additions and 0 deletions
|
@ -91,6 +91,7 @@ class PlaybackSession(
|
|||
|
||||
@JsonIgnore
|
||||
fun getTrackStartOffsetMs(index:Int):Long {
|
||||
if (index < 0 || index >= audioTracks.size) return 0L
|
||||
val currentTrack = audioTracks[index]
|
||||
return (currentTrack.startOffset * 1000L).toLong()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue