Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.37 KB

README.rst

File metadata and controls

53 lines (35 loc) · 1.37 KB

SoCo Deezer plugin

SoCo Deezer plugin is design to add Deezer tracks and albums into Sonos queue with SoCo (Sonos Controller).

Installation

Install Soco Deezer plugin:

python3 -m venv /path/of/venv
source /path/of/venv/bin/activate
pip install soco_deezer_plugin-0.3.0-py3-none-any.whl

Usage

Example of use:

from soco.discovery import any_soco
from soco_deezer_plugin.soco_deezer import DeezerSocoPlugin

device = any_soco()
device.clear_queue()

dzs = DeezerSocoPlugin(device, username="[email protected]", service_type=519)
dzs.add_track_to_queue('107028548')  # add track at the end of queue
dzs.add_album_to_queue('85607212', position=1)  # add album at the begining of queue
dzs.add_playlist_to_queue('6036493264')  # add playlist

We can use the deezer-python library to search for an album and add it into Sonos queue:

import deezer

client = deezer.Client()
artist = client.search_artists(query="Beirut")[0]
album = artist.get_albums()[0]
dzs.add_album_to_queue(album)

Contributors