tvkitchen / appliances

A one stop shop for official TV Kitchen Appliances
GNU Lesser General Public License v3.0
3 stars 0 forks source link

Support dynamic input / output types in appliances #151

Closed slifty closed 2 years ago

slifty commented 2 years ago

Feature Request

I'd like appliances to be able to have dynamic input and output types that depend on their configured settings.

For example maybe I want the caption extractor to output only TEXT.ATOMS or maybe I also want full blown lines.

This could be done by adding an optional parameter to getInputTypes() and getOutputTypes() -- specifically, passing the settings. This would allow an appliance author to return dynamic input / output types depending on those configurations. It also shouldn't break any other assumptions around input / output types staying the same for a given appliance instance because those settings are determined at the point of appliance registration -- e.g. they are basically just a permanent class decoration in the first place.

This change would be backwards compatible since it would be optional, but my modifying the Countertop and AbstractAppliance to pass the settings appropriately it would let future appliances behave with more complexity.