I must confess I have not studied your implementation, but I have now done something very similar by extending the existing 'h' hold command with a 'H' variant that prompts for a numeric tgid.
The key features: - you can hold any numeric tgid from 1-65535 - if you manually specify the tgid currently playing it will immediately be placed on hold
- if you manually specify a tgid other than the one currently playing, the system will retune to the control channel and await future calls on the specified tgid. - to clear a hold you have to use the 'h' key toggle
...and yes, for now this only works in the curses terminal until I work out the details of capturing user input via the browser interface.
Graham