Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
Fix folder name on win
Browse files Browse the repository at this point in the history
  • Loading branch information
SudoDios committed Sep 27, 2023
1 parent 170e648 commit 340c4c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/utils/Global.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import core.db.models.ModelFolder
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import java.io.File

object Global {

Expand Down Expand Up @@ -62,7 +63,7 @@ object Global {
allAudiosFolder.value = ModelFolder(childCunt = audioList.size)
favoritesFolder.value = ModelFolder(name = "Favorites", path = "#Fav", childCunt = audioList.count { it.isFav })
audioList.groupingBy { it.folder }.eachCount().forEach {
foldersList.add(ModelFolder(name = it.key.substringAfterLast("/"), type = ModelFolder.TYPE_FOLDER, path = it.key, childCunt = it.value))
foldersList.add(ModelFolder(name = it.key.substringAfterLast(File.separator), type = ModelFolder.TYPE_FOLDER, path = it.key, childCunt = it.value))
}
audioList.groupingBy { it.album }.eachCount().forEach {
albumsList.add(ModelFolder(name = it.key, type = ModelFolder.TYPE_ALBUM, path = it.key, childCunt = it.value))
Expand Down

0 comments on commit 340c4c2

Please sign in to comment.