Skip to content

feat: implement episode spoiler protection - #112

Closed
EierKopZA wants to merge 2 commits into
ProdigyV21:mainfrom
EierKopZA:feature/episode-spoiler-protection
Closed

feat: implement episode spoiler protection#112
EierKopZA wants to merge 2 commits into
ProdigyV21:mainfrom
EierKopZA:feature/episode-spoiler-protection

Conversation

@EierKopZA

Copy link
Copy Markdown
Contributor

Adds a 'Hide Spoilers' toggle in Settings to blur/blackout unwatched episode thumbnails.

Developer added 2 commits April 3, 2026 00:35
Adds a 'Hide Spoilers' toggle in Settings to blur/blackout unwatched episode thumbnails.
- Fixed duplicate declaration in SettingsViewModel\n- Restored autoPlaySingleSource in DetailsUiState\n- Fixed uiState reference out of scope in DetailsContent
@Himanth-reddy

Copy link
Copy Markdown
Collaborator

Thanks for the PR. I tested the settings flow and also reviewed the implementation, and there are still a few issues that should be fixed before merge.

1. Hide Spoilers is visible but does not actually toggle

The new row is shown in Settings and is focused at index 9, but the OK/Enter handler for General settings was not updated to match the new item order. Pressing select on that row still triggers the old action for Match Frame Rate instead of toggling Hide Spoilers.

2. DNS Provider is not reachable

The new item ordering shifted DNS Provider down, but the D-pad navigation limit for the General section still stops before that row. So users cannot navigate to DNS Provider anymore.

3. Spoiler protection does not fully hide spoiler content

In EpisodeCard, the blackout overlay is added over the thumbnail, but the episode metadata is still rendered afterward. That means the episode title, air date, rating, and overview can still appear on top of the spoiler overlay for unwatched episodes.

4. The new setting is not included in cloud sync / restore

hide_episode_spoilers is saved locally and triggers sync, but it is not included in the cloud snapshot / restore path. So it will not persist across sync/restore the same way the surrounding settings do.

Please fix the Settings navigation/action mapping, fully hide episode metadata when spoiler protection is enabled, and add the new preference to the cloud sync flow.

@ProdigyV21

Copy link
Copy Markdown
Owner

Thanks for this PR — episode spoiler protection is a nice feature and CI is green. It cannot be merged yet, though, because of the issues @Himanth-reddy already raised on 2026-04-03. Posting them again so they're consolidated and easy to address:

1. Hide Spoilers toggle does nothing when selected
The new row is displayed in Settings at focusedIndex == 9, but the OK/Enter handler for the General section was not updated to match the new item order. Pressing select on that row still triggers the old action for Match Frame Rate instead of toggling Hide Spoilers. Every subsequent focusedIndex == N branch also needs to be incremented, and the max-index clamp comment (0 -> N // General: N items) needs to be bumped.

2. DNS Provider becomes unreachable
The new item ordering shifts DNS Provider down, but the D-pad navigation limit for the General section still stops before that row. As a result users can no longer navigate down to DNS Provider at all. The navigation max index needs to be raised to match the new row count.

3. Spoiler protection does not fully hide spoiler content
In EpisodeCard, the blackout overlay is added over the thumbnail, but the episode metadata (title, air date, rating, overview) is still rendered afterward on top of the overlay. For unwatched episodes the title/overview should also be hidden or replaced with a placeholder when spoilers are enabled — otherwise the thumbnail blur is cosmetic.

4. New preference isn't cloud-synced
hide_episode_spoilers is saved locally and triggers cloud sync, but it's not included in the cloud snapshot / restore path. So toggling it looks like it persists from the UI, but it won't survive sync/restore between devices the way the surrounding settings do. Please add it to the cloud snapshot and restore flow like the other playback preferences.

Once those four points are addressed this should be in good shape to merge.

ProdigyV21 pushed a commit that referenced this pull request Apr 5, 2026
The movie budget line on the home hero banner makes the metadata row
noisy, particularly on small screens where it pushes release date,
runtime, and rating onto a second line. This adds a new Settings toggle
(General > Show Budget on Home, default ON) so users who don't care
about movie budgets can hide the field without losing the rest of the
hero metadata.

Scope of this feature was one of the multi-part requests in #72.

Changes:

- HomeUiState: new `showBudget: Boolean = true` field.
- HomeViewModel.init: loads the new `_show_budget_on_home` key from
  DataStore alongside the existing trailer_auto_play load, with a
  default of true so existing users see no change until they explicitly
  disable it.
- HomeScreen: wraps the existing "Budget $budgetText" Text (and its
  preceding `|` separator) in `if (uiState.showBudget && ...)`. No other
  visual changes.
- SettingsUiState: new `showBudget: Boolean = true` field.
- SettingsViewModel: new `showBudgetKey()` helper, loaded into UI state,
  and `setShowBudget(enabled)` mutator that persists + triggers cloud
  sync (matches the trailerAutoPlay pattern exactly).
- SettingsScreen: new `SettingsToggleRow` for "Show Budget on Home"
  inserted at focusedIndex == 13 (immediately after "Skip Profile
  Selection" and before the Network section). DNS Provider shifted from
  focusedIndex == 13 to focusedIndex == 14, and the max-index clamp in
  BOTH the auto-scroll LaunchedEffect and the D-pad-down handler bumped
  from 13 to 14 so DNS Provider remains reachable via remote navigation.
  The Enter-handler switch now maps 13 -> setShowBudget and 14 ->
  openDnsProviderPicker. This is the recurring "settings row focus
  index" footgun that burned PRs #110 and #112 previously \u2014 I've
  updated both the dynamic max-index AND the scroll auto-scroll max
  AND the per-index action switch in the same commit.
- CloudSyncRepository: adds `showBudget` to the `CloudProfileSettings`
  data class, `showBudgetKeyFor(profileId)` helper, and push/pull
  wiring so the setting syncs across devices via the existing
  account_sync_state snapshot path (the same plumbing that handles
  trailer_auto_play).

Closes #72 (Show Budget part). The other two parts of #72 (auto-hide
top bar, native debrid manager) are scoped separately as larger
features and are not in this PR.
ProdigyV21 added a commit that referenced this pull request Apr 5, 2026
* feat: Show Budget on Home toggle in Settings (#72)

The movie budget line on the home hero banner makes the metadata row
noisy, particularly on small screens where it pushes release date,
runtime, and rating onto a second line. This adds a new Settings toggle
(General > Show Budget on Home, default ON) so users who don't care
about movie budgets can hide the field without losing the rest of the
hero metadata.

Scope of this feature was one of the multi-part requests in #72.

Changes:

- HomeUiState: new `showBudget: Boolean = true` field.
- HomeViewModel.init: loads the new `_show_budget_on_home` key from
  DataStore alongside the existing trailer_auto_play load, with a
  default of true so existing users see no change until they explicitly
  disable it.
- HomeScreen: wraps the existing "Budget $budgetText" Text (and its
  preceding `|` separator) in `if (uiState.showBudget && ...)`. No other
  visual changes.
- SettingsUiState: new `showBudget: Boolean = true` field.
- SettingsViewModel: new `showBudgetKey()` helper, loaded into UI state,
  and `setShowBudget(enabled)` mutator that persists + triggers cloud
  sync (matches the trailerAutoPlay pattern exactly).
- SettingsScreen: new `SettingsToggleRow` for "Show Budget on Home"
  inserted at focusedIndex == 13 (immediately after "Skip Profile
  Selection" and before the Network section). DNS Provider shifted from
  focusedIndex == 13 to focusedIndex == 14, and the max-index clamp in
  BOTH the auto-scroll LaunchedEffect and the D-pad-down handler bumped
  from 13 to 14 so DNS Provider remains reachable via remote navigation.
  The Enter-handler switch now maps 13 -> setShowBudget and 14 ->
  openDnsProviderPicker. This is the recurring "settings row focus
  index" footgun that burned PRs #110 and #112 previously \u2014 I've
  updated both the dynamic max-index AND the scroll auto-scroll max
  AND the per-index action switch in the same commit.
- CloudSyncRepository: adds `showBudget` to the `CloudProfileSettings`
  data class, `showBudgetKeyFor(profileId)` helper, and push/pull
  wiring so the setting syncs across devices via the existing
  account_sync_state snapshot path (the same plumbing that handles
  trailer_auto_play).

Closes #72 (Show Budget part). The other two parts of #72 (auto-hide
top bar, native debrid manager) are scoped separately as larger
features and are not in this PR.

* fix: pass showBudget through to HeroSection composable (scope fix)

* fix: thread showBudget through HomeHeroLayer too (second scope fix)

---------

Co-authored-by: Arvin <arvin@arflix.local>
@EierKopZA EierKopZA closed this May 5, 2026
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.

3 participants