Files
MyTube/frontend/src/types.ts
2025-11-27 15:13:30 -05:00

54 lines
1.0 KiB
TypeScript

export interface Video {
id: string;
title: string;
author: string;
date: string;
source: 'youtube' | 'bilibili' | 'local' | 'missav';
sourceUrl: string;
videoFilename?: string;
thumbnailFilename?: string;
thumbnailUrl?: string;
videoPath?: string;
thumbnailPath?: string | null;
addedAt: string;
partNumber?: number;
totalParts?: number;
seriesTitle?: string;
rating?: number;
tags?: string[];
viewCount?: number;
progress?: number;
duration?: string;
fileSize?: string; // Size in bytes as string
lastPlayedAt?: number;
[key: string]: any;
}
export interface Collection {
id: string;
name: string;
videos: string[];
createdAt: string;
updatedAt?: string;
[key: string]: any;
}
export interface DownloadInfo {
id: string;
title: string;
timestamp?: number;
progress?: number;
speed?: string;
totalSize?: string;
downloadedSize?: string;
filename?: string;
}
export interface Comment {
id: string;
author: string;
content: string;
date: string;
avatar?: string;
}