From dc269b307627d96ab67729bf357970828cc47d12 Mon Sep 17 00:00:00 2001 From: 4gray <4gray@users.noreply.github.com> Date: Sun, 18 Jun 2023 15:23:55 +0200 Subject: [PATCH] feat(shared): add xtream code api related interfaces --- shared/xtream-category.interface.ts | 5 ++++ shared/xtream-code-actions.ts | 11 ++++++++ shared/xtream-live-stream.interface.ts | 14 +++++++++ shared/xtream-response.interface.ts | 6 ++++ shared/xtream-vod-details.interface.ts | 39 ++++++++++++++++++++++++++ shared/xtream-vod-stream.interface.ts | 14 +++++++++ 6 files changed, 89 insertions(+) create mode 100644 shared/xtream-category.interface.ts create mode 100644 shared/xtream-code-actions.ts create mode 100644 shared/xtream-live-stream.interface.ts create mode 100644 shared/xtream-response.interface.ts create mode 100644 shared/xtream-vod-details.interface.ts create mode 100644 shared/xtream-vod-stream.interface.ts diff --git a/shared/xtream-category.interface.ts b/shared/xtream-category.interface.ts new file mode 100644 index 000000000..5e5585361 --- /dev/null +++ b/shared/xtream-category.interface.ts @@ -0,0 +1,5 @@ +export interface XtreamCategory { + category_id: string; + category_name: string; + parent_id: number; +} diff --git a/shared/xtream-code-actions.ts b/shared/xtream-code-actions.ts new file mode 100644 index 000000000..2f1b1828f --- /dev/null +++ b/shared/xtream-code-actions.ts @@ -0,0 +1,11 @@ +export enum XtreamCodeActions { + GetLiveStreams = 'get_live_streams', + GetLiveCategories = 'get_live_categories', + GetSeries = 'get_series', + GetSeriesCategories = 'get_series_categories', + GetSeriesInfo = 'get_series_info', + GetVodStreams = 'get_vod_streams', + GetVodCategories = 'get_vod_categories', + GetVodInfo = 'get_vod_info', + GetShortEpg = 'get_short_epg', +} diff --git a/shared/xtream-live-stream.interface.ts b/shared/xtream-live-stream.interface.ts new file mode 100644 index 000000000..19f92777a --- /dev/null +++ b/shared/xtream-live-stream.interface.ts @@ -0,0 +1,14 @@ +export interface XtreamLiveStream { + num: number; + name: string; + stream_type: 'live'; + stream_id: number; + stream_icon: string; + epg_channel_id?: number; + added: string; + category_id: string; + custom_sid?: string; + tv_archive: number; + direct_source?: string; + tv_archive_duration: number; +} diff --git a/shared/xtream-response.interface.ts b/shared/xtream-response.interface.ts new file mode 100644 index 000000000..5723e69e9 --- /dev/null +++ b/shared/xtream-response.interface.ts @@ -0,0 +1,6 @@ +import { XtreamCodeActions } from './xtream-code-actions'; + +export interface XtreamResponse { + payload: unknown; + action: XtreamCodeActions; +} diff --git a/shared/xtream-vod-details.interface.ts b/shared/xtream-vod-details.interface.ts new file mode 100644 index 000000000..3a8e78c42 --- /dev/null +++ b/shared/xtream-vod-details.interface.ts @@ -0,0 +1,39 @@ +export interface XtreamVodDetails { + info: { + kinopoisk_url: string; + tmdb_id: number; + name: string; + o_name: string; + cover_big: string; + movie_image: string; + releasedate: string; + episode_run_time: number; + youtube_trailer: string; + director: string; + actors: string; + cast: string; + description: string; + plot: string; + age: string; + mpaa_rating: string; + rating_count_kinopoisk: number; + country: string; + genre: string; + backdrop_path: string[]; + duration_secs: number; + duration: string; + video: string[]; + audio: string[]; + bitrate: number; + rating: number; + }; + movie_data: { + stream_id: number; + name: string; + added: string; + category_id: string; + container_extension: string; + custom_sid: string; + direct_source: string; + }; +} diff --git a/shared/xtream-vod-stream.interface.ts b/shared/xtream-vod-stream.interface.ts new file mode 100644 index 000000000..a42cffd37 --- /dev/null +++ b/shared/xtream-vod-stream.interface.ts @@ -0,0 +1,14 @@ +export interface XtreamVodStream { + num: number; + name: string; + stream_type: string; + stream_id: number; + stream_icon: string; + rating: number; + rating_5based: number; + added: string; + category_id: string; + container_extension: string; + custom_sid: string; + direct_source: string; +}