Przeglądaj źródła

fix clear pattern bug

Tuan Nguyen 1 rok temu
rodzic
commit
5fb28a5575
1 zmienionych plików z 1 dodań i 9 usunięć
  1. 1 9
      app.py

+ 1 - 9
app.py

@@ -221,7 +221,7 @@ def run_theta_rho_files(
             print(f"Running pattern {idx + 1} of {len(file_paths)}: {path}")
             print(f"Running pattern {idx + 1} of {len(file_paths)}: {path}")
             run_theta_rho_file(path)
             run_theta_rho_file(path)
 
 
-            if idx < len(file_paths) - 1:
+            if clear_pattern and idx < len(file_paths) - 1:
                 if stop_requested:
                 if stop_requested:
                     print("Execution stopped before running the next clear pattern.")
                     print("Execution stopped before running the next clear pattern.")
                     return
                     return
@@ -681,14 +681,6 @@ def run_playlist():
     if not isinstance(shuffle, bool):
     if not isinstance(shuffle, bool):
         return jsonify({"success": False, "error": "'shuffle' must be a boolean value"}), 400
         return jsonify({"success": False, "error": "'shuffle' must be a boolean value"}), 400
 
 
-    # Validate run_mode
-    if run_mode not in ["single", "indefinite"]:
-        return jsonify({"success": False, "error": "'run_mode' must be 'single' or 'indefinite'"}), 400
-
-    # Validate shuffle
-    if not isinstance(shuffle, bool):
-        return jsonify({"success": False, "error": "'shuffle' must be a boolean value"}), 400
-
     # Load playlists
     # Load playlists
     playlists = load_playlists()
     playlists = load_playlists()