-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathtypes.ts
More file actions
51 lines (41 loc) · 1.23 KB
/
types.ts
File metadata and controls
51 lines (41 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import type { SongInfo } from '@/providers/song-info';
import type { ProviderName } from './providers';
export type SyncedLyricsPluginConfig = {
enabled: boolean;
preferredProvider?: ProviderName;
preciseTiming: boolean;
showTimeCodes: boolean;
defaultTextString: string | string[];
showLyricsEvenIfInexact: boolean;
lineEffect: LineEffect;
romanization: boolean;
convertChineseCharacter?:
| 'simplifiedToTraditional'
| 'traditionalToSimplified'
| 'disabled';
autoSkipLanguages?: string;
autoDislikeSkippedLanguages: boolean;
};
export type LineLyricsStatus = 'previous' | 'current' | 'upcoming';
export type LineLyrics = {
time: string;
timeInMs: number;
duration: number;
text: string;
status: LineLyricsStatus;
};
export type LineEffect = 'fancy' | 'scale' | 'offset' | 'focus';
export interface LyricResult {
title: string;
artists: string[];
lyrics?: string;
lines?: LineLyrics[];
language?: string;
}
// prettier-ignore
export type SearchSongInfo = Pick<SongInfo, 'title' | 'alternativeTitle' | 'artist' | 'album' | 'songDuration' | 'videoId' | 'tags'>;
export interface LyricProvider {
name: string;
baseUrl: string;
search(songInfo: SearchSongInfo): Promise<LyricResult | null>;
}