Actually, you could use the device pictured below to do what you asking.
Just connect the output to tv distribution side, and the incoming cable to either A or B. Connecting to A and selecting A from IR would be on, and selecting B from IR would be off(no input).
More info can be obtained
HERE