mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add livetv view
This commit is contained in:
parent
c37783479e
commit
e41436552e
44 changed files with 1396 additions and 749 deletions
|
@ -12,7 +12,7 @@ export interface CardOptions {
|
|||
overlayMoreButton?: boolean;
|
||||
overlayPlayButton?: boolean;
|
||||
overlayText?: boolean;
|
||||
preferThumb?: boolean;
|
||||
preferThumb?: boolean | string | null;
|
||||
preferDisc?: boolean;
|
||||
preferLogo?: boolean;
|
||||
scalable?: boolean;
|
||||
|
|
|
@ -15,7 +15,7 @@ export enum LibraryTab {
|
|||
Recordings = 'recordings',
|
||||
Schedule = 'schedule',
|
||||
Series = 'series',
|
||||
Shows = 'shows',
|
||||
SeriesTimers = 'seriestimers',
|
||||
Songs = 'songs',
|
||||
Suggestions = 'suggestions',
|
||||
Trailers = 'trailers',
|
||||
|
|
|
@ -1,18 +1,22 @@
|
|||
import { BaseItemKind } from '@jellyfin/sdk/lib/generated-client';
|
||||
import { LibraryTab } from './libraryTab';
|
||||
import { CollectionType } from './collectionType';
|
||||
import { SectionsView } from './suggestionsSections';
|
||||
import { SectionType } from './sections';
|
||||
|
||||
export interface SuggestionsSectionsType {
|
||||
suggestionSectionsView: SectionsView[];
|
||||
export interface SectionsView {
|
||||
suggestionSections?: SectionType[];
|
||||
favoriteSections?: SectionType[];
|
||||
programSections?: SectionType[];
|
||||
isMovieRecommendations?: boolean;
|
||||
isLiveTvUpcomingRecordings?: boolean;
|
||||
}
|
||||
|
||||
export interface LibraryTabContent {
|
||||
viewType: LibraryTab;
|
||||
itemType?: BaseItemKind[];
|
||||
collectionType?: CollectionType;
|
||||
sectionsType?: SuggestionsSectionsType;
|
||||
sectionsView?: SectionsView;
|
||||
isPaginationEnabled?: boolean;
|
||||
isBtnPlayAllEnabled?: boolean;
|
||||
isBtnQueueEnabled?: boolean;
|
||||
isBtnShuffleEnabled?: boolean;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { BaseItemDto } from '@jellyfin/sdk/lib/generated-client';
|
||||
import { BaseItemDto, SeriesTimerInfoDto } from '@jellyfin/sdk/lib/generated-client';
|
||||
import { ItemSortBy } from '@jellyfin/sdk/lib/models/api/item-sort-by';
|
||||
import { CollectionType } from './collectionType';
|
||||
|
||||
export interface ListOptions {
|
||||
items?: BaseItemDto[] | null;
|
||||
items?: BaseItemDto[] | SeriesTimerInfoDto[] | null;
|
||||
index?: string;
|
||||
showIndex?: boolean;
|
||||
action?: string | null;
|
||||
|
|
109
src/types/sections.ts
Normal file
109
src/types/sections.ts
Normal file
|
@ -0,0 +1,109 @@
|
|||
import { BaseItemKind, SortOrder } from '@jellyfin/sdk/lib/generated-client';
|
||||
import { ItemSortBy } from '@jellyfin/sdk/lib/models/api/item-sort-by';
|
||||
import { CardOptions } from './cardOptions';
|
||||
import { SectionsView } from './libraryTabContent';
|
||||
|
||||
export interface ParametersOptions {
|
||||
sortBy?: ItemSortBy[];
|
||||
sortOrder?: SortOrder[];
|
||||
includeItemTypes?: BaseItemKind[];
|
||||
isAiring?: boolean;
|
||||
hasAired?: boolean;
|
||||
isMovie?: boolean;
|
||||
isSports?: boolean;
|
||||
isKids?: boolean;
|
||||
isNews?: boolean;
|
||||
isSeries?: boolean;
|
||||
isInProgress?: boolean;
|
||||
IsActive?: boolean;
|
||||
IsScheduled?: boolean;
|
||||
limit?: number;
|
||||
imageTypeLimit?: number;
|
||||
}
|
||||
|
||||
export enum SectionApiMethod {
|
||||
ResumeItems = 'resumeItems',
|
||||
LatestMedia = 'latestMedia',
|
||||
NextUp = 'nextUp',
|
||||
RecommendedPrograms = 'RecommendedPrograms',
|
||||
LiveTvPrograms = 'liveTvPrograms',
|
||||
Recordings = 'Recordings',
|
||||
RecordingFolders = 'RecordingFolders',
|
||||
}
|
||||
|
||||
export enum SectionType {
|
||||
ContinueWatchingMovies = 'continuewatchingmovies',
|
||||
LatestMovies = 'latestmovies',
|
||||
ContinueWatchingEpisode = 'continuewatchingepisode',
|
||||
LatestEpisode = 'latestepisode',
|
||||
NextUp = 'nextUp',
|
||||
LatestMusic = 'latestmusic',
|
||||
RecentlyPlayedMusic = 'recentlyplayedmusic',
|
||||
FrequentlyPlayedMusic = 'frequentlyplayedmusic',
|
||||
ActivePrograms = 'ActivePrograms',
|
||||
UpcomingEpisodes = 'UpcomingEpisodes',
|
||||
UpcomingMovies = 'UpcomingMovies',
|
||||
UpcomingSports = 'UpcomingSports',
|
||||
UpcomingKids = 'UpcomingKids',
|
||||
UpcomingNews = 'UpcomingNews',
|
||||
LatestRecordings = 'LatestRecordings',
|
||||
RecordingFolders = 'RecordingFolders',
|
||||
ActiveRecordings = 'ActiveRecordings',
|
||||
UpcomingRecordings = 'UpcomingRecordings'
|
||||
}
|
||||
|
||||
export interface Section {
|
||||
name: string;
|
||||
type: SectionType;
|
||||
apiMethod?: SectionApiMethod;
|
||||
itemTypes: string;
|
||||
parametersOptions?: ParametersOptions;
|
||||
cardOptions: CardOptions;
|
||||
}
|
||||
|
||||
export const MovieSuggestionsSectionsView: SectionsView = {
|
||||
suggestionSections: [
|
||||
SectionType.ContinueWatchingMovies,
|
||||
SectionType.LatestMovies
|
||||
],
|
||||
isMovieRecommendations: true
|
||||
};
|
||||
|
||||
export const TvShowSuggestionsSectionsView: SectionsView = {
|
||||
suggestionSections: [
|
||||
SectionType.ContinueWatchingEpisode,
|
||||
SectionType.LatestEpisode,
|
||||
SectionType.NextUp
|
||||
]
|
||||
};
|
||||
|
||||
export const MusicSuggestionsSectionsView: SectionsView = {
|
||||
suggestionSections: [
|
||||
SectionType.LatestMusic,
|
||||
SectionType.FrequentlyPlayedMusic,
|
||||
SectionType.RecentlyPlayedMusic
|
||||
]
|
||||
};
|
||||
|
||||
export const ProgramSectionsView: SectionsView = {
|
||||
programSections: [
|
||||
SectionType.ActivePrograms,
|
||||
SectionType.UpcomingEpisodes,
|
||||
SectionType.UpcomingMovies,
|
||||
SectionType.UpcomingSports,
|
||||
SectionType.UpcomingKids,
|
||||
SectionType.UpcomingNews
|
||||
]
|
||||
};
|
||||
|
||||
export const RecordingsSectionsView: SectionsView = {
|
||||
programSections: [
|
||||
SectionType.LatestRecordings,
|
||||
SectionType.RecordingFolders
|
||||
]
|
||||
};
|
||||
|
||||
export const ScheduleSectionsView: SectionsView = {
|
||||
programSections: [SectionType.ActiveRecordings],
|
||||
isLiveTvUpcomingRecordings: true
|
||||
};
|
|
@ -1,36 +0,0 @@
|
|||
import { BaseItemKind } from '@jellyfin/sdk/lib/generated-client/models/base-item-kind';
|
||||
import { ItemSortBy } from '@jellyfin/sdk/lib/models/api/item-sort-by';
|
||||
import { SortOrder } from '@jellyfin/sdk/lib/generated-client/models/sort-order';
|
||||
import { CardOptions } from './cardOptions';
|
||||
|
||||
interface ParametersOptions {
|
||||
sortBy?: ItemSortBy[];
|
||||
sortOrder?: SortOrder[];
|
||||
includeItemTypes?: BaseItemKind[];
|
||||
}
|
||||
|
||||
export enum SectionsViewType {
|
||||
ResumeItems = 'resumeItems',
|
||||
LatestMedia = 'latestMedia',
|
||||
NextUp = 'nextUp',
|
||||
}
|
||||
|
||||
export enum SectionsView {
|
||||
ContinueWatchingMovies = 'continuewatchingmovies',
|
||||
LatestMovies = 'latestmovies',
|
||||
ContinueWatchingEpisode = 'continuewatchingepisode',
|
||||
LatestEpisode = 'latestepisode',
|
||||
NextUp = 'nextUp',
|
||||
LatestMusic = 'latestmusic',
|
||||
RecentlyPlayedMusic = 'recentlyplayedmusic',
|
||||
FrequentlyPlayedMusic = 'frequentlyplayedmusic',
|
||||
}
|
||||
|
||||
export interface Sections {
|
||||
name: string;
|
||||
view: SectionsView;
|
||||
type: string;
|
||||
viewType?: SectionsViewType,
|
||||
parametersOptions?: ParametersOptions;
|
||||
cardOptions: CardOptions;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue