{
    "version": "1.11.1",
    "description": "A tool for converting video from nearly any format to a selection of modern, widely supported codecs.",
    "homepage": "https://handbrake.fr",
    "license": "GPL-2.0-only",
    "suggest": {
        ".NET Desktop Runtime 8.0": "versions/windowsdesktop-runtime-8.0"
    },
    "architecture": {
        "64bit": {
            "url": "https://github.com/HandBrake/HandBrake/releases/download/1.11.1/HandBrake-1.11.1-x86_64-Win_GUI.zip",
            "hash": "2755446dd27a5276bbf6f32e78af44dba0c36a0d801e00bf2f4374fd21e2f5a7"
        }
    },
    "extract_dir": "HandBrake",
    "installer": {
        "script": [
            "if (!(Test-Path \"$persist_dir\\portable.ini\")) {",
            "    if (!(Test-Path \"$persist_dir\\storage\") -And (Test-Path \"$env:APPDATA\\HandBrake\")) {",
            "        New-Item \"$persist_dir\" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null",
            "        Move-Item -Path \"$env:APPDATA\\HandBrake\" -Destination \"$persist_dir\\storage\" -Force",
            "    }",
            "    Copy-Item \"$dir\\portable.ini.template\" \"$dir\\portable.ini\" -Force",
            "}"
        ]
    },
    "persist": [
        "portable.ini",
        "storage",
        "tmp"
    ],
    "shortcuts": [
        [
            "HandBrake.exe",
            "HandBrake"
        ]
    ],
    "checkver": {
        "github": "https://github.com/HandBrake/HandBrake"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://github.com/HandBrake/HandBrake/releases/download/$version/HandBrake-$version-x86_64-Win_GUI.zip"
            }
        },
        "hash": {
            "url": "https://handbrake.fr/rotation.php?file=$basename",
            "regex": "<td>$sha256</td>"
        }
    }
}
