mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-15 13:46:16 -08:00
refactor(stalker-models): add new interfaces for category, content, ITV channel, and VOD series; update favorite item interface
This commit is contained in:
1 parent
b262b98df4
commit
29552b6e7d
6 files changed
+120
-6
No files matched your search
@@ -1,4 +1,8 @@
|
||||
export * from './stalker-favorite-item.interface';
|
||||
export * from './stalker-category-item.interface';
|
||||
export * from './stalker-content-item.interface';
|
||||
export * from './stalker-itv-channel.interface';
|
||||
export * from './stalker-season.interface';
|
||||
export * from './stalker-serial-details.interface';
|
||||
export * from './stalker-vod-details.interface';
|
||||
export * from './stalker-vod-series.interface';
|
||||
@@ -0,0 +1,4 @@
|
||||
export interface StalkerCategoryItem {
|
||||
category_id: string;
|
||||
category_name: string;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { StalkerVodSource } from './stalker-favorite-item.interface';
|
||||
|
||||
/**
|
||||
* Generic content item returned by Stalker category content endpoints.
|
||||
* Used for VOD, series, and ITV category lists.
|
||||
*/
|
||||
export interface StalkerContentItem extends StalkerVodSource {
|
||||
cover?: string;
|
||||
}
|
||||
@@ -1,7 +1,67 @@
|
||||
export interface StalkerFavoriteItem {
|
||||
id?: string;
|
||||
stream_id?: string;
|
||||
movie_id?: string;
|
||||
name: string;
|
||||
details?: any;
|
||||
import {
|
||||
StalkerVodDetails,
|
||||
StalkerVodInfo,
|
||||
} from 'shared-interfaces';
|
||||
|
||||
export type StalkerSeriesFlag = true | 1 | '1';
|
||||
|
||||
/**
|
||||
* Loose source shape coming from Stalker responses / favorites payloads.
|
||||
* Keep optional to model heterogeneous portal responses.
|
||||
*/
|
||||
export interface StalkerVodSource {
|
||||
id?: string | number;
|
||||
stream_id?: string | number;
|
||||
movie_id?: string | number;
|
||||
series_id?: string | number;
|
||||
cmd?: string;
|
||||
series?: unknown[];
|
||||
has_files?: number;
|
||||
is_series?: boolean | number | string | null | undefined;
|
||||
video_id?: string;
|
||||
category_id?: string;
|
||||
title?: string;
|
||||
cover?: string;
|
||||
logo?: string;
|
||||
screenshot_uri?: string;
|
||||
name?: string;
|
||||
o_name?: string;
|
||||
description?: string;
|
||||
actors?: string;
|
||||
director?: string;
|
||||
releasedate?: string;
|
||||
year?: string;
|
||||
genre?: string;
|
||||
genres_str?: string;
|
||||
rating_imdb?: string | number;
|
||||
rating_kinopoisk?: string | number;
|
||||
info?: Partial<StalkerVodInfo> | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalized VOD item used by Stalker detail/favorites flows.
|
||||
*/
|
||||
export interface StalkerSelectedVodItem extends StalkerVodDetails {
|
||||
series?: unknown[];
|
||||
has_files?: number;
|
||||
is_series?: true;
|
||||
video_id?: string;
|
||||
category_id?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Favorite item persisted for Stalker portal.
|
||||
*/
|
||||
export interface StalkerFavoriteItem {
|
||||
id?: string | number;
|
||||
stream_id?: string | number;
|
||||
movie_id?: string | number;
|
||||
series_id?: string | number;
|
||||
category_id?: string;
|
||||
cmd?: string;
|
||||
name?: string;
|
||||
o_name?: string;
|
||||
logo?: string;
|
||||
details?: StalkerSelectedVodItem;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { StalkerVodSource } from './stalker-favorite-item.interface';
|
||||
|
||||
/**
|
||||
* ITV/live channel shape used by Stalker live TV flow.
|
||||
* Stalker channel payloads are heterogeneous, so this extends the shared source shape.
|
||||
*/
|
||||
export interface StalkerItvChannel extends StalkerVodSource {
|
||||
id: string | number;
|
||||
cmd: string;
|
||||
name?: string;
|
||||
o_name?: string;
|
||||
logo?: string;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Season item returned by Stalker VOD-series (Ministra is_series=1) endpoints.
|
||||
*/
|
||||
export interface StalkerVodSeriesSeason {
|
||||
id: string;
|
||||
video_id: string;
|
||||
season_number?: string;
|
||||
name?: string;
|
||||
is_season?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Episode item returned by Stalker VOD-series season endpoints.
|
||||
*/
|
||||
export interface StalkerVodSeriesEpisode {
|
||||
id: string;
|
||||
series_number?: number;
|
||||
episode_num?: number;
|
||||
name?: string;
|
||||
cover?: string;
|
||||
description?: string;
|
||||
duration?: number | string;
|
||||
is_episode?: boolean;
|
||||
}
|
||||
Reference in new issue
Block a user