[PR #622] [MERGED] Better Download Handler (Class) #1685

Closed
opened 2026-03-03 19:08:23 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/PlayCover/PlayCover/pull/622
Author: @amirsaam
Created: 12/24/2022
Status: Merged
Merged: 12/29/2022
Merged by: @Depal1

Base: developHead: New-Downloader


📝 Commits (10+)

  • dae44c3 New Downloader Class
  • 6742d00 Change to FileManager API
  • f7107e2 Merge branch 'develop' into New-Downloader
  • 65cd47b Merge branch 'PlayCover:develop' into New-Downloader
  • 5358f6e Merge branch 'PlayCover:develop' into New-Downloader
  • 182d780 Resolving Reviews
  • 3f1d509 As Isaac said 👽
  • 5b6b7cd preventing possible multiple downloads
  • 76b6e11 isaac gives this old man hard time
  • 40feabd Merge branch 'develop' into New-Downloader

📊 Changes

6 files changed (+162 additions, -85 deletions)

View changed files

📝 PlayCover.xcodeproj/project.pbxproj (+21 -0)
PlayCover/AppInstaller/Downloader.swift (+121 -0)
📝 PlayCover/Views/App Views/StoreAppView.swift (+7 -84)
📝 PlayCover/Views/Sidebar Views/IPALibraryView.swift (+2 -0)
📝 PlayCover/Views/ToastView.swift (+10 -1)
📝 README.md (+1 -0)

📄 Description

A new DownloadApp class has been introduced into PlayCover.
Able to cancel downloads, retries download as how many time you config it to do (default is 3)

Note: The DownloadManager package can handle multiple downloads at the same time and cancel each one of them if user wants but I avoided to implement that into PlayCover for multiple reasons like Installer.

DownloadApp class usage example:

if downloadVM.downloading {
    DownloadApp(url: nil, app: nil, warning: nil).cancel()
} else {
    DownloadApp(url: DownloadURL, app: StoreAppDataObject, warning: VersionCompareWarning).start()
}

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/PlayCover/PlayCover/pull/622 **Author:** [@amirsaam](https://github.com/amirsaam) **Created:** 12/24/2022 **Status:** ✅ Merged **Merged:** 12/29/2022 **Merged by:** [@Depal1](https://github.com/Depal1) **Base:** `develop` ← **Head:** `New-Downloader` --- ### 📝 Commits (10+) - [`dae44c3`](https://github.com/PlayCover/PlayCover/commit/dae44c37f9adfdbe896f0dc4ff0efa40695b7d0e) New Downloader Class - [`6742d00`](https://github.com/PlayCover/PlayCover/commit/6742d0052977a8cd2cfea7e47dedb4b10a4d9bcc) Change to FileManager API - [`f7107e2`](https://github.com/PlayCover/PlayCover/commit/f7107e213a6f54b1791a9317a1b33bbab96dc20a) Merge branch 'develop' into New-Downloader - [`65cd47b`](https://github.com/PlayCover/PlayCover/commit/65cd47b53f99369f34bc5e3c7a215b60f1b03cfa) Merge branch 'PlayCover:develop' into New-Downloader - [`5358f6e`](https://github.com/PlayCover/PlayCover/commit/5358f6e3bc686d4d98f09ab0500da689bf0f43ee) Merge branch 'PlayCover:develop' into New-Downloader - [`182d780`](https://github.com/PlayCover/PlayCover/commit/182d78042f525cadae3d9c230c61f08b63888658) Resolving Reviews - [`3f1d509`](https://github.com/PlayCover/PlayCover/commit/3f1d509db7c73a1a78f3c048a47f73c8d1e2a634) As Isaac said :alien: - [`5b6b7cd`](https://github.com/PlayCover/PlayCover/commit/5b6b7cdd2fa841d2143d7082db5ed43c7f4028af) preventing possible multiple downloads - [`76b6e11`](https://github.com/PlayCover/PlayCover/commit/76b6e115f90efb63baf7fa2d3bcc36887195221f) isaac gives this old man hard time - [`40feabd`](https://github.com/PlayCover/PlayCover/commit/40feabd32848928e65921da5edec7fd829bf7221) Merge branch 'develop' into New-Downloader ### 📊 Changes **6 files changed** (+162 additions, -85 deletions) <details> <summary>View changed files</summary> 📝 `PlayCover.xcodeproj/project.pbxproj` (+21 -0) ➕ `PlayCover/AppInstaller/Downloader.swift` (+121 -0) 📝 `PlayCover/Views/App Views/StoreAppView.swift` (+7 -84) 📝 `PlayCover/Views/Sidebar Views/IPALibraryView.swift` (+2 -0) 📝 `PlayCover/Views/ToastView.swift` (+10 -1) 📝 `README.md` (+1 -0) </details> ### 📄 Description A new DownloadApp class has been introduced into PlayCover. Able to cancel downloads, retries download as how many time you config it to do (default is 3) Note: The DownloadManager package can handle multiple downloads at the same time and cancel each one of them if user wants but I avoided to implement that into PlayCover for multiple reasons like Installer. DownloadApp class usage example: ```swift if downloadVM.downloading { DownloadApp(url: nil, app: nil, warning: nil).cancel() } else { DownloadApp(url: DownloadURL, app: StoreAppDataObject, warning: VersionCompareWarning).start() } ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 19:08:23 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/PlayCover#1685
No description provided.