Skip to content

Commit

Permalink
remove prints from DownloadManager
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanStepanok committed Sep 21, 2023
1 parent e1c4b4f commit 0281bc7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Core/Core/Network/DownloadManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,12 @@ public class DownloadManager: DownloadManagerProtocol {
} else {
downloadRequest = AF.download(url)
}
#if DEBUG
downloadRequest?.downloadProgress { prog in
let completed = Double(prog.fractionCompleted * 100)
print(">>>>> Downloading", download.url, completed, "%")
}
#endif
downloadRequest?.responseData(completionHandler: { [weak self] data in
guard let self else { return }
if let data = data.value, let url = self.videosFolderUrl() {
Expand Down Expand Up @@ -190,14 +192,12 @@ public class DownloadManager: DownloadManagerProtocol {
public func deleteFile(blocks: [CourseBlock]) {
for block in blocks {
do {
print(">>>>>", block.displayName, block.id)
try persistence.deleteDownloadData(id: block.id)
if let fileUrl = fileUrl(for: block.id) {
try FileManager.default.removeItem(at: fileUrl)
print("File deleted successfully")
}
} catch {
print("Error deleting file: \(error.localizedDescription)")
NSLog("Error deleting file: \(error.localizedDescription)")
}
}
}
Expand Down Expand Up @@ -250,7 +250,7 @@ public class DownloadManager: DownloadManagerProtocol {
do {
try data.write(to: fileURL)
} catch {
print("SaveFile Error", error.localizedDescription)
NSLog("SaveFile Error", error.localizedDescription)
}
}
}
Expand Down

0 comments on commit 0281bc7

Please sign in to comment.