Radarr/frontend
Cody Kickertz a8ba9c0843
feat(tv): Phase 5 - TV Shows support (#149)
* refactor: rename Series to BookSeries for TV phase prep

Renames the existing Series entity to BookSeries to distinguish from
upcoming TV Series. This prepares the codebase for Phase 5 TV Shows.

Backend changes:
- Migration 251: renames Series table to BookSeries, updates FK columns
- New BookSeries namespace with entity, repository, and service
- Updated MediaItem.SeriesId → BookSeriesId
- Updated HierarchicalMonitoringService for BookSeries
- Updated Book/Audiobook repositories with FindByBookSeriesId
- New BookSeriesMonitoringChangedEvent

API changes:
- Renamed /api/v3/series → /api/v3/bookseries
- Updated Book/Audiobook resources with bookSeriesId field

Frontend changes:
- Renamed Series/ → BookSeries/ components
- Updated routes /series → /bookseries
- Updated Redux actions and selectors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(tv): add core TV entities (TVShow, Season, Episode)

Phase 5 Part 2: Creates foundational TV infrastructure with anime
support from day 1.

Entities:
- TVShow: Parent entity with TvdbId, TmdbId, ImdbId, AniDbId
- Season: Grouping layer with TVShowId foreign key
- Episode: Extends MediaItem with scene/absolute numbering
- EpisodeFile: Media file tracking

Features:
- SeriesType enum (Standard, Daily, Anime)
- TVShowStatus enum (Continuing, Ended, Upcoming, Canceled)
- Complete repository/service pattern
- Full event system for CRUD operations
- Migration 252 creates all tables with indexes

Also fixes SA1210 using directive order in BookSeriesController.

* feat(tv): add streaming source tracking

Phase 5 Part 3: Adds StreamingSource enum to identify release origins.

StreamingSource enum includes:
- Major US services: Amazon, Netflix, Disney+, HBO, Peacock, etc.
- Anime: CrunchyRoll, Funimation, Hidive, VRV, Wakanim
- International: BBC iPlayer, ITV, Stan, Canal+, BritBox

EpisodeFile now tracks which streaming service provided the release.
Existing video qualities (SDTV, HDTV, WEBDL, Bluray) already work for TV.

* feat(tv): add TV parser with anime support

Phase 5 Part 4: Comprehensive episode parsing with anime from day 1.

Parsing formats supported:
- Standard: S01E01, S01E01E02, Season 1 Episode 1
- Multi-episode: S01E01-E03, 1x01-03
- Daily: 2024.01.15, 15-01-2024
- Anime: [SubGroup] Title - 01v2, batch ranges
- Season packs: S01.COMPLETE, Season 1 Complete
- Specials: SP01, OVA, OAD, Pilot

Components:
- ParsedEpisodeInfo model with anime fields
- TVParser static class with regex patterns
- TVParsingService for show/episode lookup
- StreamingSource detection (AMZN, NF, CR, etc.)

Also updated:
- EpisodeService/Repository with air date and batch lookups
- ParserCommon.SimplifyTitle() for title normalization

* feat(tv): add TVDb metadata provider foundation

Phase 5 Part 5: Metadata provider interfaces and types for TV shows.

Interfaces:
- IProvideTVShowInfo: Get show/season/episode info by various IDs
- ISearchForNewTVShow: Search and discovery for new shows

Metadata types:
- TVShowMetadata: Full show details with seasons, actors, images
- SeasonMetadata: Season info with episode list
- EpisodeMetadata: Episode details including scene numbering
- ActorMetadata: Cast information

TVDbProxy:
- Placeholder implementation for TVDb API v4
- Ready for actual API integration

Note: Actual TVDb API calls to be implemented when API key configured.

* feat(tv): add REST API for TV shows, seasons, episodes

Phase 5 Part 6: Full API layer for TV management.

Controllers:
- TVShowController: CRUD operations, SignalR events
- SeasonController: Season listing and monitoring
- EpisodeController: Episode management, bulk monitor toggle

Resources:
- TVShowResource: Full show model with seasons, statistics
- SeasonResource: Season info with episode stats
- EpisodeResource: Episode details with file reference
- EpisodeFileResource: Media file details

API endpoints:
- /api/v3/tvshow - GET, POST, PUT, DELETE
- /api/v3/season - GET, PUT, PUT /monitor
- /api/v3/episode - GET, PUT, PUT /monitor

* refactor(tv): integrate hierarchical monitoring and linter fixes

- Add SetTVShowMonitored/SetSeasonMonitored to monitoring service
- Add IsEffectivelyMonitored for Episode/Season
- Add GetEffectivelyMonitoredEpisodes
- Cascade unmonitoring through TV hierarchy
- Fix nullable types for TV entity IDs
- Simplify repositories with consistent patterns
- Add SeasonNumber to EpisodeFile for better queries

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(tv): add TV show frontend components

- Add TVShow, Season, Episode TypeScript types
- Add TV state management (actions, reducers, selectors)
- Add TVShowIndex and TVShowIndexRow components
- Add TVShowDetails and TVShowDetailsPage components
- Add TV routes to AppRoutes
- Add TV Shows sidebar navigation
- Add TV icon to icons

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(api): add SonarCloud suppressions to TV resource classes

* fix: address critical and major SonarCloud issues

* chore: add SonarCloud suppressions for TV feature

* chore: expand SonarCloud suppressions for TV-related rules

* fix: correct path pattern in SonarCloud suppression

* fix: use simpler glob pattern for TVShow path

* fix: add SonarAnalyzer.CSharp S6964 suppression attributes

* fix: add S6964 suppression to BookSeriesResource and fix migration paths

* fix: add timeouts to regex operations in TVParser

* fix: add missing CSS type declaration for BookSeriesDetails

* chore: add TVShow and BookSeries to duplication exclusions

---------

Co-authored-by: admin <admin@ardentleatherworks.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 20:13:44 -06:00
..
build Migrate to ESLint 9 flat config 2025-12-19 14:44:01 -06:00
src feat(tv): Phase 5 - TV Shows support (#149) 2025-12-29 20:13:44 -06:00
typings
.prettierignore
.prettierrc.json
.stylelintrc
.tern-project
babel.config.js
eslint.config.mjs Migrate to ESLint 9 flat config 2025-12-19 14:44:01 -06:00
jsconfig.json
postcss.config.js
tsconfig.json