JeffLIrion/python-androidtv

[Feature Request] Add inputid attribute to differentiate cable vs HDMI/app input

idantene opened this issue ยท 1 comments

Hey! The ADB commands work like magic and it's great -- good job and thank you so much for this integration ๐Ÿ™๐Ÿป

One thing I'm struggling with is differentiating between an active HDMI input and watching via cable.
The hdmi_input stays the same, and the source is always the org.droidtv.playtv app.
I've looked at the various state detection (as suggested in #12), but the response for GET_PROPERTIES is identical in both cases.

Could we add some property to recognize cable vs HDMI input?

EDIT: As a starting point, I found getprop | grep persist.sys to be useful, and particularly persist.sys.inputid.
EDIT 2: That solved it for me! Changed the issue to a feature request, would be great to have this perhaps in the default properties as inputid

The first step here would be to add a method called get_input_id, or something like that. If it works on both Android TV and Fire TV devices, it could go in the BaseTVSync and BaseTVAsync classes; otherwise, it would need to go in the AndroidTVSync, AndroidTVAsync, FireTVSync, and FireTVAsync classes.

Once that's added, the next step would be to get this info as part of the update method. That would be easy once this issue is done: #255