Merge pull request #11 from trycua/feature/show-indicator-prepare-download

Display indicator at processing image layers
This commit is contained in:
f-trycua
2025-02-04 11:34:14 +01:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -301,13 +301,13 @@ class ImageContainerRegistry: @unchecked Sendable {
// Set total size and file count
let totalFiles = manifest.layers.filter { $0.mediaType != "application/vnd.oci.empty.v1+json" }.count
await progress.setTotal(
manifest.layers.reduce(0) { $0 + Int64($1.size) },
files: totalFiles
)
let totalSize = manifest.layers.reduce(0) { $0 + Int64($1.size) }
Logger.info("Total download size: \(ByteCountFormatter.string(fromByteCount: totalSize, countStyle: .file))")
await progress.setTotal(totalSize, files: totalFiles)
// Process layers with limited concurrency
Logger.info("Processing Image layers")
Logger.info("This may take several minutes depending on the image size and your internet connection. Please wait...")
var diskParts: [(Int, URL)] = []
var totalParts = 0
let maxConcurrentTasks = 5

View File

@@ -17,7 +17,7 @@ struct Lume: AsyncParsableCommand {
// MARK: - Version Management
extension Lume {
enum Version {
static let current: String = "0.1.5"
static let current: String = "0.1.6"
}
}