mirror of
https://github.com/NinjaCheetah/NUSGet.git
synced 2026-02-27 23:25:29 -05:00
Added error reporting to script downloads, errors do not stop scripts
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
import requests
|
||||
from dataclasses import dataclass
|
||||
from typing import List
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -27,6 +28,14 @@ class BatchTitleData:
|
||||
archive_name: str
|
||||
|
||||
|
||||
@dataclass
|
||||
class BatchResults:
|
||||
# Class to store the results of a batch download.
|
||||
code: int
|
||||
warning_titles: List[str]
|
||||
failed_titles: List[str]
|
||||
|
||||
|
||||
def check_nusget_updates(app, current_version: str, progress_callback=None) -> str | None:
|
||||
# Simple function to make a request to the GitHub API and then check if the latest available version is newer.
|
||||
gh_api_request = requests.get(url="https://api.github.com/repos/NinjaCheetah/NUSGet/releases/latest", stream=True)
|
||||
|
||||
Reference in New Issue
Block a user