saltfish 0.2.20 → 0.2.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2301,7 +2301,8 @@ class PlaylistValidator {
2301
2301
  return { isValid: false, error: "Playlist not found in backend list" };
2302
2302
  }
2303
2303
  const hasTriggers = (foundPlaylist == null ? void 0 : foundPlaylist.hasTriggers) ?? (foundPlaylist == null ? void 0 : foundPlaylist.autoStart) ?? false;
2304
- if (hasTriggers) {
2304
+ const wasTriggered = (options == null ? void 0 : options._triggeredByTriggerManager) === true;
2305
+ if (hasTriggers && wasTriggered) {
2305
2306
  const triggerValidation = await this.validateTriggerConditions(
2306
2307
  playlistId,
2307
2308
  foundPlaylist,
@@ -2323,6 +2324,10 @@ class PlaylistValidator {
2323
2324
  }
2324
2325
  updatedOptions = onceValidation.updatedOptions || options;
2325
2326
  }
2327
+ if (updatedOptions && "_triggeredByTriggerManager" in updatedOptions) {
2328
+ const { _triggeredByTriggerManager, ...cleanOptions } = updatedOptions;
2329
+ updatedOptions = cleanOptions;
2330
+ }
2326
2331
  const compatibilityValidation = await this.validateDeviceCompatibility(
2327
2332
  foundPlaylist,
2328
2333
  playlistId
@@ -8575,7 +8580,7 @@ class TriggerManager {
8575
8580
  try {
8576
8581
  const saltfishPlayer = window._saltfishPlayer;
8577
8582
  if (saltfishPlayer && typeof saltfishPlayer.startPlaylist === "function") {
8578
- await saltfishPlayer.startPlaylist(playlistId);
8583
+ await saltfishPlayer.startPlaylist(playlistId, { _triggeredByTriggerManager: true });
8579
8584
  log(`TriggerManager: Successfully triggered playlist ${playlistId}`);
8580
8585
  } else {
8581
8586
  log("TriggerManager: Error - SaltfishPlayer instance not found or startPlaylist method not available");