Files
iptvnator/libs/shared/interfaces/src/lib/channel.model.ts
T
4gray 51e04ab069 fix(settings): fix settings issues, fix ipc commands
Update channel.model to import Channel from the local interface file
instead of the package namespace. This fixes an incorrect module
resolution and keeps the codebase consistent with local typings.

Add a new SidebarView union type ('CHANNELS' | 'PLAYLISTS') to expose
possible sidebar view options for consumers of the shared interfaces.
2025-10-23 22:55:17 +02:00

21 lines
550 B
TypeScript
Executable File

import { Channel } from './channel.interface';
/**
* Creates new channel object based on the given fields
* @param params partial channel object
*/
export function createChannel(params: Partial<Channel>): Channel {
return {
id: params?.id || params.url,
name: params.name,
group: params.group,
url: params.url,
tvg: params.tvg,
timeshift: params.timeshift,
http: params.http,
} as Channel;
}
/** Possible sidebar view options */
export type SidebarView = 'CHANNELS' | 'PLAYLISTS';