From 7207f72fea08d63b7fca0f4dcb29cec8ac0e36b6 Mon Sep 17 00:00:00 2001 From: Chris Jackson Date: Sat, 4 Apr 2020 19:31:06 +0100 Subject: [PATCH] Ensure all properties are handled in firmware Signed-off-by: Chris Jackson --- .../firmwareprovider/internal/DirectoryReader.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/com/zsmartsystems/openhab/firmwareprovider/internal/DirectoryReader.java b/src/main/java/com/zsmartsystems/openhab/firmwareprovider/internal/DirectoryReader.java index 69c32f5..9df98d6 100644 --- a/src/main/java/com/zsmartsystems/openhab/firmwareprovider/internal/DirectoryReader.java +++ b/src/main/java/com/zsmartsystems/openhab/firmwareprovider/internal/DirectoryReader.java @@ -163,6 +163,20 @@ private void loadDirectory(String filename) { FirmwareBuilder builder = getFirmwareBuilder(directoryEntry); + if (directoryEntry.getModel() != null) { + builder.withModelRestricted(true); + builder.withModel(directoryEntry.getModel()); + } + if (directoryEntry.getVendor() != null) { + builder.withVendor(directoryEntry.getVendor()); + } + if (directoryEntry.getHash() != null) { + builder.withMd5Hash(directoryEntry.getHash()); + } + if (directoryEntry.getDescription() != null) { + builder.withDescription(directoryEntry.getDescription()); + } + directoryEntry.setProviderFilename(directoryFile.getName()); directoryEntry.setFilesize(filenames.get(directoryEntry.getFilename())); directoryUpdates.put(builder.build(), directoryEntry);