{ "version": "2.0.0", "description": "A modern download manager that supports all platforms.", "homepage": "https://gopeed.com", "license": { "identifier": "GPL-3.0-or-later", "url": "https://github.com/GopeedLab/gopeed/blob/HEAD/LICENSE" }, "notes": [ "Starting with version 1.8.0, all user data is stored in the './storage' directory.", "Upgrading Gopeed via Scoop will no longer result in loss of user configuration." ], "architecture": { "64bit": { "url": "https://github.com/GopeedLab/gopeed/releases/download/v2.0.0/Gopeed-v2.0.0-windows-amd64-portable.zip", "hash": "c2849d59e4b71e088c9a92fc3538a742d7b8736cb431b64cd99d7d5284b8f285" }, "arm64": { "url": "https://github.com/GopeedLab/gopeed/releases/download/v2.0.0/Gopeed-v2.0.0-windows-arm64-portable.zip", "hash": "a8bbd3cf26dedac8dade9e16850014bded72ad953c53354bc2653440451ccd68" } }, "pre_install": [ "if ($cmd -eq \"install\") { return }", "$threshold_version = [version]\"1.7.1\"", "$parent_dir = Split-Path $dir -Parent", "# Get version directories, ignore '_' prefixed, sort by version descending", "$version_dirs = Get-ChildItem -Path $parent_dir -Directory | Where-Object {", " $_.Name -notmatch '^_' -and ($_.Name -as [version])", "} | Sort-Object { [version]$_.Name } -Descending", "if ($version_dirs.Count -lt 2) { return }", "$previous_version = [version]$version_dirs[1].Name", "info \"Detected previous version: $previous_version\"", "$storage_dir = Join-Path $persist_dir \"storage\"", "if ($previous_version -gt $threshold_version) {", " info \"Previous version ($previous_version) is newer than threshold ($threshold_version).\"", " info \"User data from the previous version already exists in $storage_dir.\"", " info \"And it has been successfully persisted, therefore no additional copy operation is required.\"", " return", "}", "info \"Previous version ($previous_version) is older than or equal to threshold ($threshold_version).\"", "info \"Attempting to copy data requiring persistence to $storage_dir...\"", "if (-not (Test-Path $storage_dir)) {", " New-Item -Path $storage_dir -ItemType Directory -Force | Out-Null", "}", "'gopeed.db', 'logs', 'extensions' | ForEach-Object {", " $user_data_path = Join-Path $version_dirs[1].FullName $_", " if (Test-Path $user_data_path) {", " info \"Found $_ at $user_data_path.\"", " info \"Starting copy to $storage_dir...\"", " Copy-Item -Path $user_data_path -Destination $storage_dir -Force -Recurse", " info \"Successfully copied $_ to $storage_dir.\"", " } else {", " info \"Item not found: $user_data_path (skipped).\"", " }", "}" ], "shortcuts": [ [ "gopeed.exe", "Gopeed" ] ], "persist": "storage", "checkver": { "github": "https://github.com/GopeedLab/gopeed" }, "autoupdate": { "architecture": { "64bit": { "url": "https://github.com/GopeedLab/gopeed/releases/download/v$version/Gopeed-v$version-windows-amd64-portable.zip" }, "arm64": { "url": "https://github.com/GopeedLab/gopeed/releases/download/v$version/Gopeed-v$version-windows-arm64-portable.zip" } } } }