flesniak / python-prodj-link

A python interface to Pioneer ProDJ Link
Apache License 2.0
141 stars 26 forks source link

[Question] How to refresh Client Data #25

Open Chrasonier opened 3 years ago

Chrasonier commented 3 years ago

Hello,

I am rebuilding for me the program to work without GUI and as API/Input for e.g. a light show at home. Unfortunately I haven't quite figured out how to get the updated client data. Via the media_change_callback I get the data once. But how do I update them?

Kind regards

flesniak commented 3 years ago

Hi,

you should be able to use set_client_change_callback, which is also used by the default monitor-qt gui: https://github.com/flesniak/python-prodj-link/blob/master/monitor-qt.py#L65

You can use the client_changed_slot implementation as reference: https://github.com/flesniak/python-prodj-link/blob/2709ac77170ff13f9441ea65020e4553475c27c0/prodj/gui/gui.py#L414-L430