andrewsayre / pyheos

An async python library for controlling HEOS devices through the HEOS CLI Protocol
Apache License 2.0
14 stars 12 forks source link

Added support for finding songs within nested heos source trees #22

Open gcjones opened 2 years ago

gcjones commented 2 years ago

Added support for finding songs within nested heos source trees - usful when using local dlna music servers.

Added the ability to browse container sources. Containers now inherit the source_id of the parent source. Songs now inherit the source_id and container_id of the parent source, allowing them to be queued. Added support for saving the queue as a playlist. Added support for getting the current queue.

Description:

When using a local dlna server with heos, the heos sources can be deeply nested and the server often does not support search directly. These changes allow the user to efficiently explore the heos source tree, finding songs and adding them to the queue.

The code works by using the browse commands to build an index for each source. By default, this is done lazily, but an index_all command gives the user the option to recursively build the full index up front.

I have also added support for saving the queue as a playlist.

I developed these chages to allow me to import XSPF playlists (exported from Sonos using soco) into my heos system.

Checklist: