add a sleep

This commit is contained in:
Karl Hudgell 2024-09-20 14:23:56 +01:00
parent ded1d477f4
commit 0ebe9b2317
2 changed files with 3 additions and 2 deletions

View File

@ -5,4 +5,4 @@ ytmusic:My Likes:playlist:LM
ytmusic:Ian Brown Music Of The Spheres:album:MPREb_qGv8CDJUptJ ytmusic:Ian Brown Music Of The Spheres:album:MPREb_qGv8CDJUptJ
ytmusic:George Michael Twenty Five:playlist:PLQs-26BNq1fQsL4yIMeTBhL3Q16EEDnyU ytmusic:George Michael Twenty Five:playlist:PLQs-26BNq1fQsL4yIMeTBhL3Q16EEDnyU
ytmusic:Dr Dre 2001:album:MPREb_6EiilRp9nkg ytmusic:Dr Dre 2001:album:MPREb_6EiilRp9nkg
ytmusic:Snoop Dogg Doggystyle:album:MPREb_0d9vS8CDlkf ytmusic:Snoop Dogg Doggystyle:album:MPREb_ajgAfvebdsT

View File

@ -1,6 +1,6 @@
import os import os
import sys import sys
import json import time
from dotenv import load_dotenv from dotenv import load_dotenv
from lib.mqtt import create_client, update_disc, control_player, create_config, check_current_disc from lib.mqtt import create_client, update_disc, control_player, create_config, check_current_disc
@ -40,6 +40,7 @@ if len(sys.argv) > 1:
else: else:
# Pass the parsed data to the update_disc function # Pass the parsed data to the update_disc function
control_player(client, "PLAY") control_player(client, "PLAY")
time.sleep(1)
update_disc(client, disc_data) update_disc(client, disc_data)
else: else:
if input_str == "EJECT": if input_str == "EJECT":