diff --git a/src/main/kotlin/net/halfbinary/prettyplayerapi/service/AlbumCacheService.kt b/src/main/kotlin/net/halfbinary/prettyplayerapi/service/AlbumCacheService.kt index 591c727..92ad85b 100644 --- a/src/main/kotlin/net/halfbinary/prettyplayerapi/service/AlbumCacheService.kt +++ b/src/main/kotlin/net/halfbinary/prettyplayerapi/service/AlbumCacheService.kt @@ -32,6 +32,7 @@ class AlbumCacheService( it.isFile && it.extension == "mp3" && it.name.startsWith("01.") } .toList() + logger.info { "Album count: ${fileList.count()}" } when (type) { CacheType.ART -> cacheArt(fileList) CacheType.NEW -> cacheNew(fileList) @@ -40,6 +41,7 @@ class AlbumCacheService( } suspend fun cacheAll(fileList: List) { + logger.debug { "Caching all albums..." } fileList.forEach { val mp3File = Mp3File(it) val folderPath = it.parentFile.toPath() @@ -57,9 +59,11 @@ class AlbumCacheService( ) ) } + logger.debug { "...completed caching all albums." } } suspend fun cacheNew(fileList: List) { + logger.debug { "Caching new albums..." } fileList.forEach { val folderPath = it.parentFile.toPath() val folderHash = folderPath.name.hashCode().toString() @@ -79,9 +83,11 @@ class AlbumCacheService( ) } } + logger.debug { "...completed caching new albums." } } suspend fun cacheArt(fileList: List) { + logger.debug { "Caching album art..." } fileList.forEach { val folderPath = it.parentFile.toPath() val folderHash = folderPath.name.hashCode().toString() @@ -89,6 +95,7 @@ class AlbumCacheService( launch { getAndWriteAlbumImageFile(it, folderHash, folderPath) } } } + logger.debug { "...completed caching album art." } } fun createAlbumArtRootDir() {