Skip to content

Commit

Permalink
Merge pull request #22 from saramaxyz/feature/fix_progress
Browse files Browse the repository at this point in the history
Fix progress callback
  • Loading branch information
pgn-dev authored Oct 11, 2023
2 parents 739014f + ca61473 commit 8bb9ddd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/AeroEdge/Infrastructure/ModelDownloader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ extension ModelDownloader: URLSessionDownloadDelegate {
let progress = Float(totalBytesWritten) / Float(totalBytesExpectedToWrite)
downloadProgress[downloadTask] = progress

guard let modelName = downloadTask.originalRequest?.url?.lastPathComponent else {
guard let modelName = downloadTask.originalRequest?.url?.lastPathComponent.replacingOccurrences(of: ".zip", with: "") else {
return
}
delegate?.modelDownloadProgress(forModel: modelName, progress: progress)
Expand Down

0 comments on commit 8bb9ddd

Please sign in to comment.