[Extension develoment] How would you update metadata from frontend extension?


I’m trying to add metadata to my favorite stream which does not use it.
So I started to code an extension catching current metadata from an http request and create a Track object that I want to push to Audio object. All is OK concerning getting the metadatas but I can’t figure out how to access Audio object to push metadatas using set_metadata() method.
I tried to use core.audio but had a pykka error in return:

 AttributeError: 'ThreadingFuture' object has no attribute 'set_metadata'

Any Help welcome.
Code can be viewed here

You would need to do self.core.audio.get().set_metadata(self.track).

A google search for the error should bring you to https://jodal.no/2011/10/06/traversable-attributes-in-pykka/ which will explain things fully.

1 Like

Right, I found this page… Should have read carefully.
Thank you’