frontend: add OXC lint/format setup and apply semicolon fixes

This commit is contained in:
2026-05-25 02:54:30 +00:00
parent 836a563897
commit f6a40babc9
26 changed files with 3452 additions and 3130 deletions
+132 -132
View File
@@ -1,205 +1,205 @@
// Type definitions for the media browser
export type CastGender = 'female' | 'male' | 'non_binary' | 'unknown';
export type CastGender = "female" | "male" | "non_binary" | "unknown"
export interface CastMember {
name: string;
character?: string | null;
profile_path: string | null;
gender?: CastGender | null;
name: string
character?: string | null
profile_path: string | null
gender?: CastGender | null
}
export interface SimilarMedia {
id: number;
title: string;
poster_path: string | null;
id: number
title: string
poster_path: string | null
}
export interface Info {
tmdb_id: number;
title: string | null;
original_title: string | null;
alternative_titles: string[] | null;
rating: number | null;
vote_count: number | null;
overview: string | null;
genres: string[] | null;
release_date: string | null;
runtime: number | null;
status: string | null;
tagline: string | null;
poster_path: string | null;
backdrop_path: string | null;
similar: SimilarMedia[] | null;
keywords: string[] | null;
cast: CastMember[] | null;
director: string | null;
creators: string[] | null;
number_of_seasons: number | null;
number_of_episodes: number | null;
networks: string[] | null;
tmdb_id: number
title: string | null
original_title: string | null
alternative_titles: string[] | null
rating: number | null
vote_count: number | null
overview: string | null
genres: string[] | null
release_date: string | null
runtime: number | null
status: string | null
tagline: string | null
poster_path: string | null
backdrop_path: string | null
similar: SimilarMedia[] | null
keywords: string[] | null
cast: CastMember[] | null
director: string | null
creators: string[] | null
number_of_seasons: number | null
number_of_episodes: number | null
networks: string[] | null
}
export interface Torrent {
title: string | null;
playable_file: string | null;
resolution: string | null;
quality: string | null;
network: string | null;
codec: string | null;
audio: string | null;
audio_languages: string[] | null;
subtitle_languages: string[] | null;
is_hdr: boolean;
has_dolby_vision: boolean;
has_dolby_atmos: boolean;
encoder: string | null;
size: number | null;
added_at: number | null;
root_id?: string | null;
title: string | null
playable_file: string | null
resolution: string | null
quality: string | null
network: string | null
codec: string | null
audio: string | null
audio_languages: string[] | null
subtitle_languages: string[] | null
is_hdr: boolean
has_dolby_vision: boolean
has_dolby_atmos: boolean
encoder: string | null
size: number | null
added_at: number | null
root_id?: string | null
}
export interface Movie {
id: string;
title: string | null;
info: Info | null;
year: number | null;
newest: number | null;
cover_path: string | null;
backdrop_path: string | null;
showreel_images: string[] | null;
showreel_source_sets: string[][] | null;
torrents: { [key: string]: Torrent };
root_id: string | null;
id: string
title: string | null
info: Info | null
year: number | null
newest: number | null
cover_path: string | null
backdrop_path: string | null
showreel_images: string[] | null
showreel_source_sets: string[][] | null
torrents: { [key: string]: Torrent }
root_id: string | null
}
export interface Episode {
episode_number: number;
name: string | null;
overview: string | null;
air_date: string | null;
runtime: number | null;
still_path: string | null;
rating: number | null;
director: string | null;
reel_image: string | null;
reel_sources: string[] | null;
torrents: { [key: string]: Torrent };
episode_number: number
name: string | null
overview: string | null
air_date: string | null
runtime: number | null
still_path: string | null
rating: number | null
director: string | null
reel_image: string | null
reel_sources: string[] | null
torrents: { [key: string]: Torrent }
}
export interface Season {
season_number: number;
name: string | null;
overview: string | null;
air_date: string | null;
poster_path: string | null;
episode_count: number | null;
episodes: Episode[];
season_number: number
name: string | null
overview: string | null
air_date: string | null
poster_path: string | null
episode_count: number | null
episodes: Episode[]
}
export interface Series {
id: string;
title: string | null;
info: Info | null;
alternative_titles: string[] | null;
newest: number | null;
cover_path: string | null;
backdrop_path: string | null;
seasons: Season[];
root_id: string | null;
id: string
title: string | null
info: Info | null
alternative_titles: string[] | null
newest: number | null
cover_path: string | null
backdrop_path: string | null
seasons: Season[]
root_id: string | null
}
export interface MediaStats {
total_movies: number;
total_movie_versions?: number;
total_series: number;
total_series_episodes?: number;
total_movies: number
total_movie_versions?: number
total_series: number
total_series_episodes?: number
}
export interface MediaIndex {
version: number;
generated_at: string;
stats: MediaStats;
movies: Movie[];
series: Series[];
version: number
generated_at: string
stats: MediaStats
movies: Movie[]
series: Series[]
}
export type MediaType = 'movies' | 'series' | 'episode';
export type MediaType = "movies" | "series" | "episode"
// Matched person info for search results
export interface MatchedPerson {
name: string;
roles: string; // e.g., "Director", "Tony Stark", "Creator"
highlightRoles: boolean; // true if the roles/character matched (vs the name)
name: string
roles: string // e.g., "Director", "Tony Stark", "Creator"
highlightRoles: boolean // true if the roles/character matched (vs the name)
}
// Matched episode info for search results
export interface MatchedEpisode {
name: string; // Episode name (highlighted)
location: string; // "SN Episode M" (dimmed)
seasonNumber: number; // For navigation to episode
episodeNumber: number; // For navigation to episode
name: string // Episode name (highlighted)
location: string // "SN Episode M" (dimmed)
seasonNumber: number // For navigation to episode
episodeNumber: number // For navigation to episode
}
// Info about why a search matched this item
export interface SearchMatchInfo {
// Matched people with their roles/characters
matchedPeople?: MatchedPerson[];
matchedPeople?: MatchedPerson[]
// Matched episodes for series
matchedEpisodes?: MatchedEpisode[];
matchedEpisodes?: MatchedEpisode[]
}
export interface MediaItem {
id: string;
title: string | null;
year?: number | null;
cover_path: string | null;
showreel_images?: string[] | null;
showreel_source_sets?: string[][] | null;
type: MediaType;
resolution?: string | null;
data: Movie | Series | EpisodeWithSeries;
root_id: string | null;
id: string
title: string | null
year?: number | null
cover_path: string | null
showreel_images?: string[] | null
showreel_source_sets?: string[][] | null
type: MediaType
resolution?: string | null
data: Movie | Series | EpisodeWithSeries
root_id: string | null
// Optional search match info - only present in search results
searchMatchInfo?: SearchMatchInfo;
searchMatchInfo?: SearchMatchInfo
}
// Episode with parent series info for standalone display
export interface EpisodeWithSeries {
episode: Episode;
series: Series;
seasonNumber: number;
episode: Episode
series: Series
seasonNumber: number
}
// Task progress info from background scanning
export interface TaskInfo {
id: string;
status: string;
progress: number;
detail: string;
id: string
status: string
progress: number
detail: string
}
// WebSocket message types (matching server msgspec tagged structs)
export interface WsInitMessage {
type: 'init';
data: { movies: Movie[]; series: Series[] };
type: "init"
data: { movies: Movie[]; series: Series[] }
}
export interface WsUpsertMessage {
type: 'upsert';
kind: 'movie' | 'series';
item: Movie | Series;
type: "upsert"
kind: "movie" | "series"
item: Movie | Series
}
export interface WsRemoveMessage {
type: 'remove';
kind: 'movie' | 'series';
id: string;
type: "remove"
kind: "movie" | "series"
id: string
}
export interface WsTaskMessage {
type: 'task';
data: TaskInfo;
type: "task"
data: TaskInfo
}
export type WsMessage = WsInitMessage | WsUpsertMessage | WsRemoveMessage | WsTaskMessage;
export type WsMessage = WsInitMessage | WsUpsertMessage | WsRemoveMessage | WsTaskMessage