Enclosed fix takes, if "Description" empty, the setup code as name. This as, as I understand it, almost surely unique.
If desired, I will be happy to check it in.
Code: Select all
Index: src/main/java/com/hifiremote/jp1/DeviceUpgradeExporter.java
===================================================================
--- src/main/java/com/hifiremote/jp1/DeviceUpgradeExporter.java (revision 2042)
+++ src/main/java/com/hifiremote/jp1/DeviceUpgradeExporter.java (working copy)
@@ -750,7 +750,8 @@
jp1Parameters.put( "Protocol.name", upgrade.getProtocol().getName() );
Remote remote = new Remote( metaData, null, notes, commands, applicationParameters );
- remote.setName( upgrade.getDescription() );
+ remote.setName( upgrade.getDescription() != null ? upgrade.getDescription()
+ : ( "SetupCode_" + Integer.toString(upgrade.getSetupCode() ) ) );
RemoteConfiguration config = null;
File file = upgrade.getFile() != null ? upgrade.getFile()
: ( config = upgrade.getRemoteConfig() ) != null ? config.getOwner().file : null;
Index: src/main/java/com/hifiremote/jp1/RemoteConfiguration.java
===================================================================
--- src/main/java/com/hifiremote/jp1/RemoteConfiguration.java (revision 2042)
+++ src/main/java/com/hifiremote/jp1/RemoteConfiguration.java (working copy)
@@ -11380,7 +11380,7 @@
{
continue;
}
- String description = upgrade.getDescription();
+ String description = rSet.iterator().next().getName();
if ( !exports.contains( description ) )
{
fullSet.append( rSet );