Files
PlexPlaylistSync/types.ts
T
Koha9 4158d999de Squashed 'sample-front-end/' changes from 601ffe4..552f9c4
552f9c4 feat: Centralize animation and timing constants
cc962c2 feat: Adjust sync animation gradient
e623426 feat: Add playlist sync functionality and animations

git-subtree-dir: sample-front-end
git-subtree-split: 552f9c471324793b85af14534e81d45d319036a2
2025-11-29 03:53:38 +09:00

73 lines
1.3 KiB
TypeScript

export interface Track {
id: string;
title: string;
artist: string;
duration: number; // in seconds
}
export interface Playlist {
id: string;
title: string;
trackCount: number;
thumbnail?: string;
lastUpdated: string;
tracks?: Track[]; // Optional detailed track list
}
export enum ServerType {
LOCAL = 'LOCAL',
CLOUD = 'CLOUD'
}
export enum SyncStrategy {
LOCAL_OVERWRITE = 'LOCAL_OVERWRITE',
CLOUD_OVERWRITE = 'CLOUD_OVERWRITE',
MERGE_LOCAL = 'MERGE_LOCAL',
MERGE_CLOUD = 'MERGE_CLOUD'
}
export enum SyncState {
IDLE = 'IDLE',
SYNCING = 'SYNCING',
SUCCESS = 'SUCCESS',
ERROR = 'ERROR'
}
export interface RegexReplacement {
id: string;
pattern: string;
replacement: string;
}
export interface PlexLibrary {
id: string;
title: string;
type: string;
}
export interface PlexServerConnection {
isConnected: boolean;
name?: string;
ip?: string;
port?: number;
libraryName?: string;
libraries?: PlexLibrary[];
}
export interface PlexConnectionSettings {
protocol: 'http' | 'https';
address: string;
port: string;
token: string;
username?: string;
password?: string;
timeout?: number; // in seconds
}
export interface ApiResponse<T> {
data: T;
status: 'success' | 'error';
message?: string;
}