Skip to content

Commit

Permalink
Update ValidateWatchedStatus.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
koenoe committed Jan 26, 2025
1 parent 27d874f commit 3b8bb4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/Watched/ValidateWatchedStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default async function ValidateWatchedStatus({
// First handle active transitions between lists. While most state changes are handled by
// the Lambda watch handler, these transitions can occur when:
// - New episodes are released for a previously watched series
// - Episodes are removed/corrected in the external TV database
// - Episodes are removed/corrected in the TMDB
// - Edge cases or failures in the Lambda handler

if (isInWatchedList && tvSeriesIsInProgress) {
Expand Down Expand Up @@ -102,7 +102,7 @@ export default async function ValidateWatchedStatus({
// Series is fully watched but not in watched list
// This is usually handled by the Lambda but could occur from:
// - Edge cases in the Lambda handler
// - Episode count corrections in external TV database
// - Episode count corrections in TMDB
await Promise.all([
addToList({
userId: user.id,
Expand All @@ -126,7 +126,7 @@ export default async function ValidateWatchedStatus({
}

// Collect cleanup tasks for invalid states that could arise from:
// - Data corrections in external TV database
// - Data corrections in TMDB
// - Edge cases in Lambda handler
// - Network errors during list operations
const cleanupTasks = [];
Expand All @@ -145,7 +145,7 @@ export default async function ValidateWatchedStatus({
if (isInWatchedList && tvSeriesIsNotWatchedNorInProgress) {
// Remove from "watched" list if no episodes are watched
// Can occur due to:
// - Episode count corrections in external TV database
// - Episode count corrections in TMDB
// - Edge cases in Lambda handler
cleanupTasks.push(
removeFromList({
Expand Down

0 comments on commit 3b8bb4e

Please sign in to comment.