Hi Scott-
I'm working on adapting THC Jukebox for multi-zone use. What I'm trying to do is make a one zone import file, that has all the required devices, tasks, and theme. This is imported repeatedly, once per zone. Then I am taking advantage of the way that HB handles multiple devices with same name (the appended -1, -2, -3 etc) in my script in order to service all the different zones.
All this works great. There is a flaw though (which is why I am in the Bug section ;-). The duplicated Theme itself is handled right (incremented number), but the FILE that contains it is not- when I import, I get a warning that the file is going to be over-written. If you let it do this, it breaks all the links between the devices and theme (bad- a lot of extra work!). What I have been doing to work around this is to stop HB, manually rename the file, then use MDBplus to fix the filename in the database, as I can't find a way to do this from within HB. I have to do this between each import.
So my bug comes down to this- importing a theme file that is already in the themes directory is not handled properly. There should be a third option for collisions- overwrite, don't import, and import with incremented filename.
Thanks
Markd
Repeated theme imports
Re: Repeated theme imports
Just getting a chance to look into this... finally.
I think a better solution is to just rename/number the file as it does with Devices, Tasks, etc. That way the new theme file will always be unique. Overwriting Theme files seems really dangerous. I never really added the necessary protection for this scenario, but I can see where it would be an issue with your setup.
I think a better solution is to just rename/number the file as it does with Devices, Tasks, etc. That way the new theme file will always be unique. Overwriting Theme files seems really dangerous. I never really added the necessary protection for this scenario, but I can see where it would be an issue with your setup.
Scott
Re: Repeated theme imports
Ok with me- that fixes my case!
Thanks
Markd
Thanks
Markd