mirror of
https://github.com/euzu/tuliprox.git
synced 2026-09-28 12:02:09 +02:00
154 lines
2.9 KiB
TypeScript
154 lines
2.9 KiB
TypeScript
export enum InputType {
|
|
m3u = "m3u",
|
|
xtream = "xtream"
|
|
}
|
|
|
|
export enum SortOrder {
|
|
asc = "asc",
|
|
desc = "desc"
|
|
}
|
|
|
|
export enum TargetType {
|
|
m3u = "m3u",
|
|
xtream = "xtream",
|
|
strm = "strm"
|
|
}
|
|
|
|
export enum ProcessingOrder {
|
|
frm = "frm",
|
|
fmr = "fmr",
|
|
rfm = "rfm",
|
|
rmf = "rmf",
|
|
mfr = "mfr",
|
|
mrf = "mrf",
|
|
}
|
|
|
|
export interface InputConfig {
|
|
id: number,
|
|
input_type: InputType,
|
|
url: string,
|
|
username: string,
|
|
password: string,
|
|
persist: string,
|
|
name: string,
|
|
enabled: boolean
|
|
}
|
|
|
|
export interface TargetConfig {
|
|
enabled: boolean,
|
|
name: string,
|
|
options: {
|
|
ignore_logo: boolean,
|
|
underscore_whitespace: boolean,
|
|
cleanup: boolean,
|
|
kodi_style: boolean,
|
|
xtream_skip_live_direct_source: boolean,
|
|
xtream_skip_video_direct_source: boolean,
|
|
xtream_resolve_series: boolean,
|
|
},
|
|
sort: {
|
|
match_as_ascii: boolean,
|
|
groups: {
|
|
order: SortOrder
|
|
},
|
|
channels:
|
|
{
|
|
field: string,
|
|
group_pattern: string,
|
|
order: SortOrder
|
|
}[]
|
|
},
|
|
filter: string,
|
|
output: [
|
|
{
|
|
target: TargetType,
|
|
filename: string
|
|
}
|
|
],
|
|
rename: [
|
|
{
|
|
field: string,
|
|
pattern: string,
|
|
new_name: string
|
|
}
|
|
],
|
|
mapping: string[],
|
|
processing_order: ProcessingOrder,
|
|
watch: string[]
|
|
}
|
|
|
|
export interface SourceConfig {
|
|
inputs: InputConfig[];
|
|
targets: TargetConfig[];
|
|
}
|
|
|
|
export interface VideoDownloadConfig {
|
|
headers: Record<string, string>,
|
|
directory: string;
|
|
organize_into_directories: boolean;
|
|
episode_pattern: string;
|
|
}
|
|
|
|
export interface VideoConfig {
|
|
extensions: string[];
|
|
download?: VideoDownloadConfig,
|
|
web_search?: string;
|
|
}
|
|
|
|
export interface TelegramConfig {
|
|
bot_token: string;
|
|
chat_ids: string[];
|
|
}
|
|
|
|
export interface MessagingConfig {
|
|
notify_on?: string[];
|
|
telegram?: TelegramConfig;
|
|
}
|
|
|
|
export interface Credentials {
|
|
username: string;
|
|
password: string;
|
|
token: string;
|
|
proxy: 'redirect' | 'reverse';
|
|
}
|
|
|
|
export interface TargetUser {
|
|
target: string;
|
|
credentials: Credentials[];
|
|
}
|
|
|
|
export interface ApiProxyServerInfo {
|
|
protocol: string;
|
|
ip: string;
|
|
http_port: string;
|
|
https_port: string;
|
|
rtmp_port: string;
|
|
timezone: string;
|
|
message: string;
|
|
}
|
|
|
|
export interface ApiProxyConfig {
|
|
server: ApiProxyServerInfo;
|
|
user: TargetUser[];
|
|
}
|
|
|
|
export interface ServerApiConfig {
|
|
host: string;
|
|
port: number;
|
|
web_root: string
|
|
}
|
|
|
|
export interface ServerMainConfig {
|
|
api: ServerApiConfig;
|
|
threads: number;
|
|
working_dir: string;
|
|
backup_dir: string;
|
|
schedule: string;
|
|
messaging?: MessagingConfig;
|
|
video?: VideoConfig;
|
|
}
|
|
|
|
export default interface ServerConfig extends ServerMainConfig {
|
|
sources: SourceConfig[];
|
|
api_proxy?: ApiProxyConfig;
|
|
} |