feat: add hide spoilers setting for unwatched episodes

This commit is contained in:
edde746
2026-02-26 11:55:45 +01:00
parent cbf9913e8a
commit 414e5804eb
24 changed files with 150 additions and 15 deletions
+9
View File
@@ -100,4 +100,13 @@ extension PlexMetadataType on PlexMetadata {
bool get isClip => _lowerType == ContentTypes.clip;
bool get isMusicContent => ContentTypes.musicTypes.contains(_lowerType);
bool get isVideoContent => ContentTypes.videoTypes.contains(_lowerType);
/// Whether this episode should have spoiler protection applied.
/// True when the item is an unwatched episode with no active progress.
bool get shouldHideSpoiler {
if (!isEpisode) return false;
if (isWatched) return false;
if (viewOffset != null && viewOffset! > 0) return false;
return true;
}
}