Page 1 of 1
Problem importing KM file into RM
Posted: Wed Dec 03, 2003 10:48 am
by ezwrighter
I was importing a "Tivo (Advanced)" Protocol device into RM .77 from KM 8.01 and RM reported that the protocol did not exist. The protocol in the protocols.ini file had different capatalization "TiVo (Advanced)" so it could not find it.
Once I changed the capatalization in protocols.ini everything worked fine. Might want to think about changing your comparison to equalsignorecase.
Eric
Posted: Wed Dec 03, 2003 11:36 am
by gfb107
Actually, protocol lookup is done using a Hashtable, which doesn't really provide a mechanism for using equalsIgnoreCase() instead of equals(). I suppose I could always convert the name to upperCase (or lower) when putting/getting protocols.
Alternatively, RM already has a mechanism for handling differences in protocol names between RM and KM (and old versions of KM). Every protocol in protocols.ini can have a OldNames attribute, which is a comma separated list of names that RM will also use to match an imported protocol name if there is no exact match.
Anyway, I think it would make sense to add code to RM to allow the user to manually select a protocol when RM fails to automatically match the protocol.
Posted: Wed Dec 03, 2003 1:21 pm
by ezwrighter
hmmm, the other interesting thing was that the protocol IDs matched....is this not taken into account? Or are those fairly meaningless numbers?
Eric
Posted: Wed Dec 03, 2003 2:35 pm
by gfb107
Currently the protocol ID is not taken into account. This is just a result of the fact that the original documentation I received for the format of the saved KM upgrade files did not mention that it was there. I'll look into parsing it out and using it to help find the protocol.
It actually turns out that the protocol ID is not always enough to uniquely identify a protocol. Neither is the name, actually.