Schlaubischlump / shairport-metadatareader-python

A shairport-metadata-reader package written in Python, which supports reading the metadata from the pipe file, the UDP-server and the MQTT server if configured.
GNU General Public License v3.0
9 stars 4 forks source link

Start listener without starting shairport-sync? #2

Open domb84 opened 3 years ago

domb84 commented 3 years ago

This library seems great and does nearly exactly what I require, but I already have a service that controls shairport. When I start the listener using the below, it starts it's own shairport-sync daemon that then conflicts with my existing service.

Is there an option to just read the pipe? I can't find an example for that. I've tried all the listener options and it always starts up it's own daemon.

    def listener(self):
        listener = AirplayPipeListener()
        listener.bind(track_info=self.on_track_info)  # receive callbacks for metadata changes
        listener.start_listening()
Schlaubischlump commented 3 years ago

Glad you like the project!

Sadly there is no option, but you can either modify the code yourself or look at the fork of @htruong. He disabled the automatic start of the shairport client.

If I find the time, I will either add an option or only start the client if it isn't already running.

domb84 commented 3 years ago

Glad you like the project!

Sadly there is no option, but you can either modify the code yourself or look at the fork of @htruong. He disabled the automatic start of the shairport client.

If I find the time, I will either add an option or only start the client if it isn't already running.

Amazing! I'll look at that fork thank you. It's the last piece of the puzzle for my project.