Files
iptvnator/libs/shared/interfaces/src/lib/playlist.interface.ts
T
StefanandClaude 2f8aee72df feat(xtream): add catch-up playback to favorites and recent tabs (#1166)
Enables Xtream catch-up/timeshift from the Favorites and Recent surfaces (per-playlist and global), not just Live TV, and adds start-over replay of the currently-airing programme. Carries tv_archive/tv_archive_duration through the favorites and recently-viewed DB projections and maps them onto UnifiedCollectionItem; tv_archive_duration is interpreted as days, matching live-stream-layout.controlledArchiveDays.

Closes #1138.

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-19 06:38:19 +02:00

81 lines
2.8 KiB
TypeScript

import { PlaylistRecentlyViewedItem } from './playlist-recently-viewed.interface';
import { StalkerPortalItem } from './stalker-portal-item.interface';
/**
* An interface that describe the possible states of the playlist update/refresh process
*/
export enum PlaylistUpdateState {
UPDATED,
IN_PROGRESS,
NOT_UPDATED,
}
/**
* Describes playlist interface
*/
export interface Playlist {
_id: string;
title: string;
filename?: string;
playlist?: any;
importDate: string;
lastUsage: string;
/**
* M3U playlists store channel URL strings (`string[]`).
* Stalker portals store full item objects (`StalkerPortalItem[]`).
*/
favorites?: (string | StalkerPortalItem)[];
items?: unknown[];
header?: unknown;
count: number;
url?: string;
userAgent?: string;
referrer?: string;
origin?: string;
filePath?: string;
/** M3U-scoped EPG source URLs enabled for automatic import and lookup. */
epgUrls?: string[];
/** All M3U EPG source URLs detected from the playlist header. */
detectedEpgUrls?: string[];
/** Playlist-local EPG source URLs explicitly enabled by the user. */
manualEpgUrls?: string[];
/** Detected playlist EPG source URLs explicitly disabled by the user. */
disabledEpgUrls?: string[];
autoRefresh: boolean;
updateDate?: number;
updateState?: PlaylistUpdateState;
position?: number;
isTemporary?: boolean;
serverUrl?: string;
username?: string;
password?: string;
macAddress?: string;
portalUrl?: string;
recentlyViewed?: PlaylistRecentlyViewedItem[];
/** Indicates if this is a full stalker portal URL (e.g., /stalker_portal/c) requiring handshake authentication */
isFullStalkerPortal?: boolean;
/** Xtream server timezone string for catch-up URL construction */
serverTimezone?: string;
/** Session token for full stalker portal authentication - persisted for session */
stalkerToken?: string;
/** Serial number for stalker portal - generated once and stored for consistency */
stalkerSerialNumber?: string;
/** Optional device ID 1 for stalker portal - if not provided, auto-generated from MAC */
stalkerDeviceId1?: string;
/** Optional device ID 2 for stalker portal - if not provided, auto-generated from MAC */
stalkerDeviceId2?: string;
/** Optional signature 1 for stalker portal - required by some portals for device verification */
stalkerSignature1?: string;
/** Optional signature 2 for stalker portal - required by some portals for device verification */
stalkerSignature2?: string;
/** Account info from get_profile call */
stalkerAccountInfo?: {
login?: string;
expireDate?: number;
tariffPlanName?: string;
status?: number;
};
/** Hidden M3U group titles for the groups view */
hiddenGroupTitles?: string[];
}