first commit
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
export interface ThemeDef {
|
||||
slug: string;
|
||||
label: string;
|
||||
emoji: string;
|
||||
// Optional search tokens for providers; fallback to label
|
||||
tokens?: string[];
|
||||
}
|
||||
|
||||
export const THEMES: ThemeDef[] = [
|
||||
{ label: 'Tendances & Viral', slug: 'trending', emoji: '🔥', tokens: ['Trending', 'Viral'] },
|
||||
{ label: 'En direct', slug: 'live', emoji: '🎥', tokens: ['Live', 'Streaming'] },
|
||||
{ label: 'Jeux vidéo & Esports', slug: 'gaming', emoji: '🎮', tokens: ['Gaming', 'Esports'] },
|
||||
{ label: 'Sports', slug: 'sports', emoji: '🏅' },
|
||||
{ label: 'Actualités & Politique', slug: 'news', emoji: '🗞️', tokens: ['News', 'Politics'] },
|
||||
{ label: 'Finance & Crypto', slug: 'finance-crypto', emoji: '💰', tokens: ['Finance', 'Crypto'] },
|
||||
{ label: 'Business & Startups', slug: 'business', emoji: '🏢', tokens: ['Business', 'Startups'] },
|
||||
{ label: 'Tech & Gadgets', slug: 'tech', emoji: '🧠', tokens: ['Tech', 'Gadgets'] },
|
||||
{ label: 'Science & Espace', slug: 'science', emoji: '🚀', tokens: ['Science', 'Space'] },
|
||||
{ label: 'Santé & Bien-être', slug: 'health', emoji: '🩺', tokens: ['Health', 'Wellness'] },
|
||||
{ label: 'Musique', slug: 'music', emoji: '🎵', tokens: ['Music'] },
|
||||
{ label: 'Podcasts & Talk-shows', slug: 'podcasts', emoji: '🎙️', tokens: ['Podcasts', 'Talk shows'] },
|
||||
{ label: 'Cinéma & Séries', slug: 'movies-tv', emoji: '🎬', tokens: ['Movies', 'TV'] },
|
||||
{ label: 'Éducation & Tutoriels', slug: 'education', emoji: '🎓', tokens: ['Education', 'Tutorials'] },
|
||||
{ label: 'Voyage', slug: 'travel', emoji: '🧳', tokens: ['Travel'] },
|
||||
{ label: 'Cuisine & Alimentation', slug: 'food', emoji: '🍳', tokens: ['Food', 'Cooking'] },
|
||||
{ label: 'DIY, Bricolage & Makers', slug: 'diy-makers', emoji: '🛠️', tokens: ['DIY', 'Makers'] },
|
||||
{ label: 'Auto, Moto & Mécanique', slug: 'autos', emoji: '🚗', tokens: ['Cars', 'Auto', 'Moto'] },
|
||||
{ label: 'Nature & Animaux', slug: 'nature-animals', emoji: '🌿', tokens: ['Nature', 'Animals'] },
|
||||
{ label: 'Humour & Sketches', slug: 'comedy', emoji: '😂', tokens: ['Comedy'] },
|
||||
{ label: 'Art, Design & Photo', slug: 'art-design', emoji: '🖌️', tokens: ['Art', 'Design', 'Photography'] },
|
||||
{ label: 'Vlogs & Lifestyle', slug: 'vlogs', emoji: '📹', tokens: ['Vlogs', 'Lifestyle'] },
|
||||
{ label: 'Tests, Avis & Unboxings', slug: 'reviews', emoji: '📦', tokens: ['Reviews', 'Unboxing'] },
|
||||
{ label: 'Documentaires', slug: 'documentary', emoji: '📜', tokens: ['Documentary'] },
|
||||
{ label: 'Famille & Enfants', slug: 'family-kids', emoji: '👨👩👧', tokens: ['Family', 'Kids'] },
|
||||
];
|
||||
|
||||
export function slugifyThemeLabel(label: string): string {
|
||||
return String(label || '')
|
||||
.normalize('NFKD')
|
||||
.replace(/[\u0300-\u036f]/g, '')
|
||||
.toLowerCase()
|
||||
.replace(/[^a-z0-9]+/g, '-')
|
||||
.replace(/^-+|-+$/g, '');
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
|
||||
export interface Video {
|
||||
url: string;
|
||||
type: string;
|
||||
title: string;
|
||||
thumbnail: string;
|
||||
uploaderName: string;
|
||||
uploaderUrl?: string;
|
||||
uploaderAvatar: string;
|
||||
uploadedDate: string;
|
||||
shortDescription?: string | null;
|
||||
duration: number;
|
||||
views: number;
|
||||
uploaded: number;
|
||||
videoId: string;
|
||||
}
|
||||
|
||||
export interface VideoDetail extends Video {
|
||||
description: string;
|
||||
subscribers: number;
|
||||
likes: number;
|
||||
dislikes: number;
|
||||
videoStreams: VideoStream[];
|
||||
audioStreams: AudioStream[];
|
||||
relatedStreams: Video[];
|
||||
comments: Comment[];
|
||||
}
|
||||
|
||||
export interface VideoStream {
|
||||
url: string;
|
||||
format: string;
|
||||
quality: string;
|
||||
mimeType: string;
|
||||
codec: string;
|
||||
videoOnly: boolean;
|
||||
}
|
||||
|
||||
export interface AudioStream {
|
||||
url: string;
|
||||
format: string;
|
||||
quality: string;
|
||||
mimeType: string;
|
||||
codec: string;
|
||||
}
|
||||
|
||||
export interface Comment {
|
||||
author: string;
|
||||
thumbnail: string;
|
||||
commentText: string;
|
||||
commentedTime: string;
|
||||
likeCount: number;
|
||||
replies?: Comment[];
|
||||
}
|
||||
Reference in New Issue
Block a user