Tuan Nguyen пре 11 месеци
родитељ
комит
90c9ae7f8c
5 измењених фајлова са 7 додато и 8 уклоњено
  1. 1 1
      app.py
  2. 1 2
      modules/core/playlist_manager.py
  3. 3 3
      static/css/style.css
  4. 1 1
      static/js/main.js
  5. 1 1
      templates/index.html

+ 1 - 1
app.py

@@ -414,7 +414,7 @@ async def add_to_playlist(request: AddToPlaylistRequest):
 async def run_playlist_endpoint(request: PlaylistRequest):
     """Run a playlist with specified parameters."""
     try:
-        if not os.path.exists(os.path.join(PLAYLISTS_DIR, f"{request.playlist_name}.json")):
+        if not os.path.exists(playlist_manager.PLAYLISTS_FILE):
             raise HTTPException(status_code=404, detail=f"Playlist '{request.playlist_name}' not found")
 
         # Start the playlist execution

+ 1 - 2
modules/core/playlist_manager.py

@@ -85,7 +85,7 @@ def add_to_playlist(playlist_name, pattern):
     logger.info(f"Added pattern '{pattern}' to playlist '{playlist_name}'")
     return True
 
-async def run_playlist(playlist_name, pause_time=0, clear_pattern=None, run_mode="single", shuffle=False, schedule_hours=None):
+async def run_playlist(playlist_name, pause_time=0, clear_pattern=None, run_mode="single", shuffle=False):
     """Run a playlist with the given options."""
     if pattern_manager.pattern_lock.locked():
         logger.warning("Cannot start playlist: Another pattern is already running")
@@ -113,7 +113,6 @@ async def run_playlist(playlist_name, pause_time=0, clear_pattern=None, run_mode
                 clear_pattern=clear_pattern,
                 run_mode=run_mode,
                 shuffle=shuffle,
-                schedule_hours=schedule_hours
             )
         )
         return True, f"Playlist '{playlist_name}' is now running."

+ 3 - 3
static/css/style.css

@@ -1132,7 +1132,7 @@ body.playing #currently-playing-container:not(.open) #progress-container {
     margin-bottom: 10px;
 }
 
-#serial_status_header::before {
+#connection_status_header::before {
     content: '';
     width: 20px;
     height: 20px;
@@ -1143,11 +1143,11 @@ body.playing #currently-playing-container:not(.open) #progress-container {
     transition: var(--transition-slow) background-color;
 }
 
-#serial_status_header.connected::before {
+#connection_status_header.connected::before {
     background-color: var(--color-success);
 }
 
-#serial_status_header.not-connected::before {
+#connection_status_header.not-connected::before {
     background-color: var(--color-error);
 }
 

+ 1 - 1
static/js/main.js

@@ -582,7 +582,7 @@ async function checkSerialStatus() {
     const response = await fetch('/serial_status');
     const status = await response.json();
     const statusElement = document.getElementById('serial_status');
-    const statusHeaderElement = document.getElementById('serial_status_header');
+    const statusHeaderElement = document.getElementById('connection_status_header');
     const serialPortsContainer = document.getElementById('serial_ports_container');
     const selectElement = document.getElementById('serial_ports');
 

+ 1 - 1
templates/index.html

@@ -10,7 +10,7 @@
 </head>
 <body>
 <header>
-    <h1 id="serial_status_header" class="status">Dune Weaver Controller</h1>
+    <h1 id="connection_status_header" class="status">Dune Weaver Controller</h1>
 </header>
 <div class="app">
     <!-- Home Tab -->