Closed project-owner closed 9 months ago
You can observe the metadata
property. For example:
#!/usr/bin/env python3
import mpv
player = mpv.MPV()
@player.property_observer('metadata')
def foo(property_name, new_value):
print('metadata update', new_value)
player.play('http://stream0.wfmu.org/freeform-high.aac')
player.wait_for_playback()
Thanks, it works! I just needed to provide input parameters to the function (property_name and new_value) https://github.com/project-owner/Peppy/blob/c4b55544bbaca5930f74c2d609bc285bc47d7629/player/mpvclient.py#L79
Hi,
I recently upgraded to the lates version of the python-mpv and cannot find mpv.MpvEventID.METADATA_UPDATE anymore. It was used to detect when online radio changes track. Is there any direct replacement?
Thanks!