|
@@ -1,8 +1,11 @@
|
|
import os
|
|
import os
|
|
import sys
|
|
import sys
|
|
import json
|
|
import json
|
|
|
|
+from dotenv import load_dotenv
|
|
from lib.mqtt import create_client, update_disc, control_player, create_config
|
|
from lib.mqtt import create_client, update_disc, control_player, create_config
|
|
|
|
|
|
|
|
+load_dotenv()
|
|
|
|
+
|
|
# Define the MQTT server details
|
|
# Define the MQTT server details
|
|
broker = os.environ.get("broker")
|
|
broker = os.environ.get("broker")
|
|
port = int(os.environ.get("port"))
|
|
port = int(os.environ.get("port"))
|
|
@@ -30,4 +33,5 @@ else:
|
|
print("No JSON argument passed, running default control_player action.")
|
|
print("No JSON argument passed, running default control_player action.")
|
|
|
|
|
|
# You can still have the default behavior if no JSON is passed
|
|
# You can still have the default behavior if no JSON is passed
|
|
-control_player(client, "EJECT")
|
|
|
|
|
|
+# control_player(client, "EJECT")
|
|
|
|
+
|