radusuciu / traktor_nowplaying

A cross-platform library and command-line tool that extracts the currently playing track in Traktor and optionally outputs to a file with configurable formatting.
MIT License
56 stars 8 forks source link

Get another metadata #11

Open csipapicsa opened 4 months ago

csipapicsa commented 4 months ago

Hi,

I try to get another metadata not just artist and title, but there is nothing else

from traktor_nowplaying import Listener

listener = Listener(port=7777, quiet=False)

def on_metadata(data):
    print(f"Artist: {data.get('artist')}")
    print(f"Title: {data.get('title')}")
    print(f"Tempo: {data.get('tempo')}")
    print(data)

listener.on_metadata = on_metadata
listener.start()

# Keep the program running to listen for broadcasts
while True:
    pass

Does Traktor not streaming it, or I can't get access? Thanks!

radusuciu commented 4 months ago

I'm not sure off the top of my head, but I can look into it. Have you verified that the track does have the metadata attributes you're trying to get?