diff --git a/bucket/freetube.json b/bucket/freetube.json index b87f13e7edd864..b35cc74e7ca081 100644 --- a/bucket/freetube.json +++ b/bucket/freetube.json @@ -13,16 +13,26 @@ "hash": "f2cdfc564c66cc3476f97e8f7e4aa084671bb576e61ae7e54ca71de88b55f611" } }, + "pre_install": [ + "if (Test-Path \"$env:AppData\\freetube\") {", + " info '[Persistent AppData]: Moving user data...'", + " ensure \"$persist_dir\\UserData\" | Out-Null", + " Copy-Item \"$env:AppData\\freetube\\*\" \"$persist_dir\\UserData\\\" -Recurse -Force -ErrorAction 'SilentlyContinue'", + " Remove-Item \"$env:AppData\\freetube\" -Recurse -Force -ErrorAction 'SilentlyContinue'", + "}" + ], "shortcuts": [ [ "FreeTube.exe", - "FreeTube" + "FreeTube", + "--user-data-dir=\"$persist_dir\\UserData\"" ] ], "checkver": { "url": "https://github.com/FreeTubeApp/FreeTube/tags", "regex": "v([\\w.-]+)" }, + "persist": "UserData", "autoupdate": { "architecture": { "64bit": { diff --git a/bucket/motrix.json b/bucket/motrix.json index b5ef6fbb95fb5a..0f545407cdede9 100644 --- a/bucket/motrix.json +++ b/bucket/motrix.json @@ -9,19 +9,27 @@ "hash": "sha512:b8af895ba86f77ed5837b8a65580ec828b45fab647998bc1c82dc82426b857340a4306fc5222a6fb64c0f1c338bb221b90d8f563c7c7aa87d46664722ad56ab9", "pre_install": [ "Expand-7zipArchive \"$dir\\`$PLUGINSDIR\\app-64.7z\" \"$dir\"", - "Remove-Item \"$dir\\`$*\" -Force -Recurse" + "Remove-Item \"$dir\\`$*\" -Force -Recurse", + "if (Test-Path \"$env:AppData\\motrix\") {", + " info '[Persistent AppData]: Moving user data...'", + " ensure \"$persist_dir\\UserData\" | Out-Null", + " Copy-Item \"$env:AppData\\motrix\\*\" \"$persist_dir\\UserData\\\" -Recurse -Force -ErrorAction 'SilentlyContinue'", + " Remove-Item \"$env:AppData\\motrix\" -Recurse -Force -ErrorAction 'SilentlyContinue'", + "}" ] } }, "shortcuts": [ [ "Motrix.exe", - "Motrix" + "Motrix", + "--user-data-dir=\"$persist_dir\\UserData\"" ] ], "checkver": { "github": "https://github.com/agalwood/Motrix" }, + "persist": "UserData", "autoupdate": { "architecture": { "64bit": {