feat(plugins): change websockets Data field type to []byte for binary support

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan
2026-03-02 16:38:00 -05:00
parent 30df004d4d
commit 6fd044fb09
10 changed files with 94 additions and 22 deletions
+7 -1
View File
@@ -246,6 +246,12 @@ func buildProperty(field FieldDef, knownTypes map[string]bool) xtpProperty {
return prop
}
// Handle primitive types (including []byte which maps to string/byte, not array)
if isPrimitiveGoType(goType) {
prop.Type, prop.Format = goTypeToXTPTypeAndFormat(goType)
return prop
}
// Handle slice types
if strings.HasPrefix(goType, "[]") {
elemType := goType[2:]
@@ -259,7 +265,7 @@ func buildProperty(field FieldDef, knownTypes map[string]bool) xtpProperty {
return prop
}
// Handle primitive types
// Handle remaining types
prop.Type, prop.Format = goTypeToXTPTypeAndFormat(goType)
return prop
}