fix: only re-add song to queue if previously 1-star and queue < 500

- Check rating === 1 before re-adding to prevent adding songs that were
  never in the queue
- Only re-add when queue has fewer than 500 items

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Finomosec 2026-06-01 14:53:41 +02:00
parent 6082dcd250
commit ac723fccd5

View File

@ -76,7 +76,7 @@ export const useRating = (resource, record) => {
audio.dispatchEvent(new Event('ended'))
}
}
} else if (val !== 1 && !inQueue) {
} else if (rating === 1 && val !== 1 && !inQueue && queue.length < 500) {
dispatch(addTracks({ [trackId]: record }))
}
}