From ec0ad07cd4526d5233d3b08954b0e5530f321953 Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Wed, 6 Jul 2022 16:54:29 +0200 Subject: [PATCH] adjust example --- examples/full.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/full.py b/examples/full.py index 8cb30dde..2cf8e3aa 100644 --- a/examples/full.py +++ b/examples/full.py @@ -223,8 +223,9 @@ async def main(): # we can also send an uri, such as spotify://track/abcdfefgh # or database://playlist/1 # or a list of items - artist = await mass.music.artists.get("2", ProviderType.DATABASE) - await test_player1.active_queue.play_media(artist) + if playlist_count > 0: + playlist = await mass.music.playlists.get("1", ProviderType.DATABASE) + await test_player1.active_queue.play_media(playlist) await asyncio.sleep(3600) -- 2.34.1