Skip to content

fix(stalker): refresh series season picker and next episode from saved progress - #2153

Open
peremunoz wants to merge 2 commits into
4gray:masterfrom
peremunoz:fix/stalker-series-next-episode-2123
Open

peremunoz wants to merge 2 commits into
4gray:masterfrom
peremunoz:fix/stalker-series-next-episode-2123

Conversation

@peremunoz

Copy link
Copy Markdown

What changed

  • Hydrate pending regular VOD-series seasons sequentially when a Stalker series view opens with saved playback positions (StalkerVodSeasonEpisodeLoader.hydrateForSavedProgress), so the season picker displays total and watched episode counts per season and saved progress is reconciled across seasons.
  • Update getStalkerSeriesQuickStartButton (stalker-series-quick-start.ts) so that once episodes in a regular season have been watched, earlier unloaded or skipped seasons do not override the next unwatched episode after the last watched episode (e.g., watching S04E01–S04E02 offers S04E03, and finishing Season 4 advances to an unloaded Season 5 instead of wrapping back to S01E01).
  • Update resolveAutoSelectedSeason (season-auto-select.util.ts) and createSeasonAutoSelectState (season-auto-select.state.ts) to prefer the season of the first unwatched episode after the last watched episode and re-resolve auto-selection as lazy VOD seasons finish hydrating (while preserving manual season tab selections and local watched toggles).

Why

Fixes #2123

When opening a multi-season Stalker lazy VOD series (is_series=1) with saved playback progress in later seasons, only Season 1 was loaded initially. As a result:

  1. Unopened seasons in the Episodes dropdown lacked episode and watched counts until each season was manually clicked.
  2. Saved positions for later seasons were not reconciled until those seasons were opened, causing the hero quick-start button and season selector to point to earlier seasons (S01E01 / S02E01) instead of continuing from the first unwatched episode after the last watched episode (such as S04E03 after S04E02).

Release note

  • Added a note under .changes/
  • Not needed (test-only, docs, CI, or a refactor with no behavior change)

Checks

  • Tests added or updated for the changed behavior
  • pnpm run lint and the affected pnpm nx test <project> pass

@4gray
4gray marked this pull request as ready for review November 13, 2026 08:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T16:07:34.780653Z 1fe616e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issue was found.

Summary

Loads pending Stalker seasons when saved progress exists, fills season counts, and updates the picker and play button as episodes arrive.

  • Saved progress loads pending Stalker seasons one at a time.
  • Quick start follows the next episode after the latest watched one.
  • The season picker follows progress after the latest watched episode.

Reviews (2) · Last reviewed commit: "fix(stalker): address series progress re..." · Reviewed by Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eb9a79c2e6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@4gray
4gray force-pushed the fix/stalker-series-next-episode-2123 branch from eb9a79c to 1fe616e Compare November 14, 2026 15:49
@4gray

4gray commented Nov 14, 2026

Copy link
Copy Markdown
Owner

@greptileai

@4gray

4gray commented Nov 14, 2026

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1fe616ee4b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +185 to +186
keys
.slice(keys.indexOf(lastWatchedKey) + 1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Natural-sort season keys before selecting the successor

When a Stalker provider omits season_number and returns named seasons out of order, mapVodSeriesEpisodes() keeps those names as keys, and the container's numeric sort does not reorder them. For keys ['Season 2', 'Season 1', 'Season 3'], with Season 1 watched and the other two unwatched, this slice now selects Season 3; getSeriesNextUp() correctly targets Season 2, and the previous fallback also selected Season 2. Apply the shared natural season order before finding the last-watched index and its successor.

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Episodes drop down and next episode isn't refreshing to actual episode

2 participants