Add missing seasons endpoint and update metadata handling
ci / build-backend (push) Successful in 4m7s
ci / build-frontend (push) Successful in 41s
ci / tests (push) Successful in 2m4s
ci / sonar (push) Successful in 4m41s

Implemented a new endpoint to retrieve missing seasons for shows, enhancing the MetadataEndpoints class. Updated the IMetadataProvider interface to include a method for fetching season numbers. Adjusted the ShowSummaryDto to include other genres and modified the ListShowsQueryHandler to handle multiple genres. Enhanced the Omdb and Tmdb metadata providers to support season number retrieval. Updated frontend components to integrate missing seasons functionality, including API calls and UI elements for displaying missing seasons reports.
This commit is contained in:
Leonid Pershin
2026-07-27 02:40:09 +03:00
parent 07c43a6875
commit 986f7ff52d
17 changed files with 540 additions and 53 deletions
+14 -1
View File
@@ -154,8 +154,10 @@ export type ShowSummaryDto = {
year: number | null
hasPoster: boolean
createdAt: string
/** Основной жанр — в списке показывается только он. */
/** Основной жанр — его показывает колонка списка. */
primaryGenre: string | null
/** Прочие жанры — в списке прячутся под «…». */
otherGenres: string[]
}
type ShowGenreDto = {
@@ -310,6 +312,17 @@ export type MissingEpisodesReport = {
seasons: SeasonGapDto[]
}
export type MissingSeasonsReport = {
/** Сколько сезонов у сериала по источнику; null — источник не отдал данные. */
expected: number | null
/** Номера сезонов, где загружена хотя бы одна серия. */
loaded: number[]
/** Номера сезонов из источника, где не загружено ни одной серии. */
missing: number[]
/** Загруженные сезоны, которых источник не знает. */
unknown: number[]
}
type EpisodeDto = {
id: string
mediaAssetId: string
+7
View File
@@ -308,6 +308,7 @@ export const en = {
loadedSeasons: 'Loaded seasons',
genre: 'Genre',
allGenres: 'All genres',
otherGenres: 'Other genres',
genresEmpty: 'No genres set',
genresEdit: 'Genres',
genresHint:
@@ -676,6 +677,12 @@ export const en = {
missingUnknown: 'The source did not return the episode count for this season.',
missingNone: 'All episodes present.',
missingList: 'Missing',
findMissingSeasons: 'Find missing seasons',
missingSeasonsTitle: 'Missing seasons',
missingSeasonsUnknownTotal: 'The source did not return the season list for this series.',
missingSeasonsNone: 'All seasons present.',
missingSeasonsList: 'Seasons with no loaded episodes',
missingSeasonsUnknown: 'The source does not know these loaded seasons: {{list}}.',
},
},
}
+7
View File
@@ -309,6 +309,7 @@ export const ru = {
loadedSeasons: 'Загружены сезоны',
genre: 'Жанр',
allGenres: 'Все жанры',
otherGenres: 'Остальные жанры',
genresEmpty: 'Жанры не проставлены',
genresEdit: 'Жанры',
genresHint:
@@ -682,6 +683,12 @@ export const ru = {
missingUnknown: 'Источник не отдал число серий этого сезона.',
missingNone: 'Все серии на месте.',
missingList: 'Не хватает',
findMissingSeasons: 'Найти отсутствующие сезоны',
missingSeasonsTitle: 'Отсутствующие сезоны',
missingSeasonsUnknownTotal: 'Источник не отдал список сезонов этого сериала.',
missingSeasonsNone: 'Все сезоны на месте.',
missingSeasonsList: 'Не загружено ни одной серии из сезонов',
missingSeasonsUnknown: 'Источник не знает загруженные сезоны: {{list}}.',
},
},
}