node build fixed

This commit is contained in:
ra_ma
2025-09-20 14:08:38 +01:00
parent c6ebbe069d
commit 3d298fa434
1516 changed files with 535727 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
package extension_repo
import (
"github.com/goccy/go-json"
"os"
"seanime/internal/extension"
)
func extractExtensionFromFile(filepath string) (ext *extension.Extension, err error) {
// Get the content of the file
fileContent, err := os.ReadFile(filepath)
if err != nil {
return
}
err = json.Unmarshal(fileContent, &ext)
if err != nil {
// If the manifest data is corrupted or not a valid manifest, skip loading the extension.
// We don't add it to the InvalidExtensions list because there's not enough information to
return
}
return
}