From e190c3a5333b185ee4da34a184ba690fe43d90f1 Mon Sep 17 00:00:00 2001 From: aarbit Date: Thu, 6 Jun 2024 00:34:06 -0500 Subject: [PATCH] Fixes bad push --- .../net/halfbinary/prettyplayerapi/service/MusicService.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/kotlin/net/halfbinary/prettyplayerapi/service/MusicService.kt b/src/main/kotlin/net/halfbinary/prettyplayerapi/service/MusicService.kt index ff8fad3..de868b1 100644 --- a/src/main/kotlin/net/halfbinary/prettyplayerapi/service/MusicService.kt +++ b/src/main/kotlin/net/halfbinary/prettyplayerapi/service/MusicService.kt @@ -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")