Fixes bad push
This commit is contained in:
parent
9edcb5566b
commit
e190c3a533
@ -9,7 +9,6 @@ class MusicService(private val albumCacheService: AlbumCacheService) {
|
|||||||
fun getMusic(albumHash: String, trackNumber: Int): File {
|
fun getMusic(albumHash: String, trackNumber: Int): File {
|
||||||
val albumInfo = albumCacheService.getAlbumCache()[albumHash]
|
val albumInfo = albumCacheService.getAlbumCache()[albumHash]
|
||||||
return if(albumInfo != null) {
|
return if(albumInfo != null) {
|
||||||
File(albumInfo.albumFolder).listFiles()[trackNumber-1]
|
|
||||||
File(albumInfo.albumFolder).listFiles().sortedBy { it.name }[trackNumber-1]
|
File(albumInfo.albumFolder).listFiles().sortedBy { it.name }[trackNumber-1]
|
||||||
} else {
|
} else {
|
||||||
throw AlbumHashNotFoundException("Album hash $albumHash not found")
|
throw AlbumHashNotFoundException("Album hash $albumHash not found")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user