Add missing seasons endpoint and update metadata handling
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:
@@ -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
|
||||
|
||||
@@ -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}}.',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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}}.',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user