Closed postlund closed 10 months ago
Patch coverage: 100.00%
and no project coverage change.
Comparison is base (
d13ede5
) 88.95% compared to head (1954e13
) 88.95%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
0.14.0 Lisa (2023-09-04)
Finally time for a new release and this (despite the few number of commits) is a big one: this release introduces the storage API! In reality, the storage API comes with two distinct features:
The first one is pretty obvious and also the biggest one here. From now on, pyatv will automatically save credentials to a file when pairing and automatically load them again without the need of manually specifying them (the same applies to passwords aswell). This is true for built in scripts like
atvremote
andatvscript
. You need to add a few lines of code to support it within your applications.The API is generic in the sense that you can implement your own storage if you like. Perhaps you want to store your credentials in Dropbox or a Google Document? That is possible by writing a custom storage module. This release ships with a
FileStorage
module that stores settings in a local file using JSON as storage format. There's also aMemoryStorage
module that just keeps settings in memory. The latter one is used by default if no storage is provided as a means of backwards compatibility.Moving on to generic settings then. Ways to alter the behavior of pyatv has been requested in several ways throughout the years. Beit specifying port nunbers or changing the way a protocol behaves. There has not been any way of implementing such settings until now. Biggest reason for it was because I wanted to implement storage first to see how things would fit together. I guess the benefit is that we now got both features at once.
As a start, only a few metadata fields like MAC address and operating system version can be changed. I will add more settings over time and you can request additional settings by opening issues. As new settings adds extra maintenance burden (e.g. more tests), I will be a bit picky though.
I have fixed a small detail in the documentation as well. The value of members in enums are now shown. Only the name was shown before. The same change also applies to the pydantic models used for settings, so you can see default values for all settings directly in the API reference.
Oh, and one more thing... A wizard moved in to
atvremote
. If you runatvremote wizard
, he will find all your devices, let you pick one and help out with setting it up (guiding you through pairing and passwords). Once you have completed the wizard, all credentials are saved to storage and you don't have to think about that anymore. Pretty neat, huh? This is still an early version, so expect bugs and please report them so they can be fixed.That is is. A pretty good release to be honest. Time for some rest!
Changes:
Other:
All changes: