pyatv icon indicating copy to clipboard operation
pyatv copied to clipboard

How to get current selected user?

Open seidnerj opened this issue 3 years ago • 2 comments

What do you need help with?

I'd like to be able to count the total playing time for certain apps per Apple TV user. I can get the play state, and the app, so I can count total play time per app but I do not know how to get the current selected user. Is that something that is possible to do?

seidnerj avatar Sep 11 '22 15:09 seidnerj

I'm not sure it's possible to see the current user. There's an API to change user, but I haven't seen anything for detecting current user. I'll keep it in mind and post an update here if I find any references.

postlund avatar Sep 15 '22 17:09 postlund

Thanks a lot!

seidnerj avatar Sep 16 '22 07:09 seidnerj

I didn't find a command to get the current user when implementing the #1914, as Shortcuts doesn't have such a feature. The device does send a new system info payload in a _systemInfoUpdate message right after an account switch, but I didn't see anything matching the user name or id in the system info.

michalmo avatar May 07 '23 18:05 michalmo

That's really bizarre, I'd expect some indication of a user is or the likes. Very much unexpected, but thanks for the update.

seidnerj avatar May 07 '23 19:05 seidnerj