EspoirX / StarrySky

🔥A Powerful and Streamline MusicLibrary(一个丰富的音乐播放封装库,支持多种音频格式,完美解决你的问题。)
https://github.com/EspoirX/StarrySky
MIT License
1.4k stars 211 forks source link

列表播放模式,设置isLoop无效 #182

Closed 18801261807 closed 3 years ago

18801261807 commented 3 years ago

列表播放模式,最后一首播放完,会自动返回第一首 大概是这个方法引起的 fun currSongIsLastSong(): Boolean { val lastSong = provider.getSongInfoByIndex(currentQueueSize - 1) return getCurrentSongInfo(true)?.songId == lastSong?.songId }

currentQueueSize 始终为0

改成这样就可以了 fun currSongIsLastSong(): Boolean { val songlist :List = provider.songList val lastSong = provider.getSongInfoByIndex(songlist.size - 1) return getCurrentSongInfo(true)?.songId == lastSong?.songId } 没有太多时间深入了解了,您也试一下,麻烦了

EspoirX commented 3 years ago

hao