-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for AudioStation RemotePlayer function #125
base: master
Are you sure you want to change the base?
Adding support for AudioStation RemotePlayer function #125
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first I would like to thank you for this great contribution 👍
I've already put some first review comments, but honestly could not test the code itself yet, since i do not have the audio station in use 🙈 (will install it on a vDSM to test it)
Therefore may i ask you to also add code tests and an usage example to README.rst
Further I would like to ask you, to add you on the list Credits / Special Thanks for the audio station part, to honour your work 🙂
BTW i've opened a support ticket with Synology to ask for a documentation of the audio-stations web-api 🤞
@@ -8,6 +8,7 @@ | |||
from requests import Session | |||
from requests.exceptions import RequestException | |||
|
|||
from .api.audio_station import SynoAudioStation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also add handling for SynoAudioStation in update()
and reset()
method below (compare with SynoSurveillanceStation or SynoSurveillanceStation)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ty for all the comments, will add some tests as soon as I got some time
When I look at the the update / reset mechanism it's to provide some kind of cache ?
Since the AudioStation part I added is mainly to control / monitor realtime music. Does is make sense to cache a playlist status that can change every few seconds ?
If I add the update()
/ reset()
part which info should actually be updated ? The remote player info, current playlist, the info from the getInfo
method (got to add it 😄 ) ?
It makes me think more about if I' m correct to add it as an "AudioStation" class, or should I split it in different classes :
AudioStationInfo
AudioStationRemotePlayer
AudioStationRemotePlayerStatus
This design would be more similar to the core
part I guess ?
I realize that I kinda went with a different approach than the rest of the lib, returning the objects on calls. And not storing them on the model itself
Hi,
Added some support for the basic remote player functions.
It isn't a complete list as I didn't find any documentation, and most was created by looking at network tab from chrome.
Comments to improve code are welcome :)