Skip to content

Commit

Permalink
Fix song play index, new update soon!
Browse files Browse the repository at this point in the history
  • Loading branch information
CraftWorksMC committed May 30, 2024
1 parent 28c7ad4 commit 1acfa74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId = "com.craftworks.music"
minSdk = 30
targetSdk = 34
versionCode = 210
versionName = "1.21"
versionCode = 211
versionName = "1.21.1"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class SongHelper {
val currentTrackIndex = currentTracklist.indexOfFirst { it.mediaId == url.toString() }
currentSong = songsList.sortedBy { it.title }[currentTrackIndex]

mediaController?.setMediaItems(currentTracklist)
mediaController?.setMediaItems(currentTracklist, currentTrackIndex, 0)
mediaController?.seekToDefaultPosition(currentTrackIndex)
mediaController?.prepare()
mediaController?.play()
Expand Down

0 comments on commit 1acfa74

Please sign in to comment.