mirror of
https://github.com/community-scripts/ProxmoxVE-Local.git
synced 2026-03-31 06:23:54 -04:00
[PR #120] [MERGED] Fix: Detect downloaded scripts from all directories (ct, tools, vm) #195
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/community-scripts/ProxmoxVE-Local/pull/120
Author: @michelroegl-brunner
Created: 10/13/2025
Status: ✅ Merged
Merged: 10/13/2025
Merged by: @michelroegl-brunner
Base:
main← Head:fix/addons_vms_tools_notshown📝 Commits (2)
40857feFix: Detect downloaded scripts from all directories (ct, tools, vm, vw)b4e168cFix: Remove redundant type annotation and method call arguments📊 Changes
5 files changed (+102 additions, -3 deletions)
View changed files
📝
src/app/_components/DownloadedScriptsTab.tsx(+1 -1)📝
src/app/_components/ScriptsGrid.tsx(+1 -1)📝
src/app/page.tsx(+1 -1)📝
src/server/api/routers/scripts.ts(+10 -0)📝
src/server/lib/scripts.ts(+89 -0)📄 Description
Problem
Scripts downloaded to directories other than
scripts/ct/were not being detected and shown in the Downloaded Scripts tab. The Available Scripts tab also showed incorrect download status for scripts intools/,vm/, andvw/directories.Solution
getAllDownloadedScripts()method toScriptManagerclass that scans all script directories (ct, tools, vm, vw)tools/pve/DownloadedScriptsTabto use the new API endpointScriptsGridto use the new API endpoint for download status detectiongetCtScriptsendpointChanges
src/server/lib/scripts.ts: AddedgetAllDownloadedScripts()and recursivegetScriptsFromDirectory()methodssrc/server/api/routers/scripts.ts: AddedgetAllDownloadedScriptsAPI endpointsrc/app/page.tsx: Updated to use new API for script countssrc/app/_components/DownloadedScriptsTab.tsx: Updated to use new API endpointsrc/app/_components/ScriptsGrid.tsx: Updated to use new API endpointTesting
Fixes the issue where scripts downloaded to non-ct directories were not properly tracked or displayed.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.