Fixes bad push

This commit is contained in:
aarbit 2024-06-06 00:34:06 -05:00
parent 9edcb5566b
commit e190c3a533

View File

@ -9,7 +9,6 @@ class MusicService(private val albumCacheService: AlbumCacheService) {
fun getMusic(albumHash: String, trackNumber: Int): File {
val albumInfo = albumCacheService.getAlbumCache()[albumHash]
return if(albumInfo != null) {
File(albumInfo.albumFolder).listFiles()[trackNumber-1]
File(albumInfo.albumFolder).listFiles().sortedBy { it.name }[trackNumber-1]
} else {
throw AlbumHashNotFoundException("Album hash $albumHash not found")