musikr: reformat

This commit is contained in:
Alexander Capehart 2025-03-15 21:36:16 -06:00
parent 652f0891fc
commit b3c66d9b55
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
2 changed files with 6 additions and 2 deletions

View file

@ -40,7 +40,8 @@ interface CoverStorage {
companion object {
suspend fun at(dir: File): CoverStorage {
withContext(Dispatchers.IO) {
if (dir.exists()) check(dir.isDirectory) { "Not a directory" } else check(dir.mkdirs()) { "Cannot create directory" }
if (dir.exists()) check(dir.isDirectory) { "Not a directory" }
else check(dir.mkdirs()) { "Cannot create directory" }
}
return CoverStorageImpl(dir)
}

View file

@ -49,7 +49,10 @@ class MutableStoredCovers(
is CoverResult.Hit -> cover.cover
is CoverResult.Miss -> return CoverResult.Miss()
}
val coverFile = coverStorage.write(cover.id + transcoding.tag) { transcoding.transcodeInto(cover.data(), it) }
val coverFile =
coverStorage.write(cover.id + transcoding.tag) {
transcoding.transcodeInto(cover.data(), it)
}
return CoverResult.Hit(coverFile)
}