postlund / pyatv

A client library for Apple TV and AirPlay devices
https://pyatv.dev
MIT License
838 stars 91 forks source link

Output all identifiers and mac address when scanning with atvscript #2282

Closed maxileith closed 6 months ago

maxileith commented 7 months ago

Hi @postlund ,

for the use-case I am currently working on, I use Airplay MAC-Adresses as an identifier https://github.com/maxileith/homebridge-appletv-enhanced/issues/20. Therefore, I always need to get the MAC-Address as an identifier from atvscript. However, currently the returned identifier from atvscript scan is not always the MAC-Address. Therefore, I would suggest to add an attribute all_identifieres to the output json. By not touching identifier of the output json, backward compatability is given.

I'd love to hear your thoughts on that.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (427c362) 88.95% compared to head (a3a4c65) 88.80%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2282 +/- ## ========================================== - Coverage 88.95% 88.80% -0.15% ========================================== Files 168 168 Lines 11370 11370 ========================================== - Hits 10114 10097 -17 - Misses 1256 1273 +17 ``` [see 4 files with indirect coverage changes](https://app.codecov.io/gh/postlund/pyatv/pull/2282/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Pierre+St%C3%A5hl)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

maxileith commented 7 months ago

I have updated the pull request to include the MAC-Address in the device infos since I noticed that this is available on the atv object anyways

maxileith commented 6 months ago

Hi @postlund ,

Can you do a ruff estimation on when you will have the time to look at the PR? I don't want to stress, I am just curious and would like to evaluate wether I will wait for the PR or do a workaround 😬

postlund commented 6 months ago

@maxileith Sorry about the delay, I will try to get around doing that this week!

postlund commented 6 months ago

Sorry for not getting back sooner on this, but it looks good to me! 👍 I'll see if there's anything else to include, otherwise I can make a minor release soon with this change.

maxileith commented 6 months ago

@postlund don't worry about the late response. We all have private lifes besides our passion for FOSS 😉