-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathtypes.ts
More file actions
94 lines (82 loc) · 1.99 KB
/
Copy pathtypes.ts
File metadata and controls
94 lines (82 loc) · 1.99 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
export interface Artist {
id: number | string;
name: string;
picture?: string;
type?: string;
}
export interface Album {
id: number | string;
title: string;
cover: string;
artist?: Artist;
releaseDate?: string;
}
export interface Playlist {
uuid: string;
title: string;
description?: string;
image: string;
creator: { name: string };
isLocal?: boolean; // Flag for user created playlists
tracks?: Track[];
}
export interface Track {
id: number | string;
title: string;
artist: Artist;
album: Album;
duration: number; // in seconds
streamUrl?: string; // Direct URL if available
quality?: 'LOW' | 'HIGH' | 'LOSSLESS' | 'HI_RES';
lyrics?: string; // Synced lyrics or plain text
}
export type RepeatMode = 'OFF' | 'ALL' | 'ONE';
export interface PlayerState {
currentTrack: Track | null;
isPlaying: boolean;
volume: number;
progress: number;
queue: Track[];
isShuffling: boolean;
repeatMode: RepeatMode;
}
export enum ViewState {
HOME = 'HOME',
SEARCH = 'SEARCH',
LIBRARY = 'LIBRARY',
ALBUM_DETAILS = 'ALBUM_DETAILS',
ARTIST_DETAILS = 'ARTIST_DETAILS',
PLAYLIST_DETAILS = 'PLAYLIST_DETAILS',
LIKED_SONGS = 'LIKED_SONGS'
}
export interface SearchResult {
tracks: Track[];
albums: Album[];
artists: Artist[];
playlists: Playlist[];
}
export type AudioQuality = 'LOW' | 'HIGH' | 'LOSSLESS' | 'HI_RES';
export interface RecentlyPlayedItem {
type: 'TRACK' | 'ALBUM' | 'ARTIST' | 'PLAYLIST';
data: Track | Album | Artist | Playlist;
timestamp: number;
}
export interface LocalStorageData {
likedSongs: Track[];
playlists: Playlist[];
savedAlbums: Album[];
followedArtists: Artist[];
searchHistory: string[];
audioQuality: AudioQuality;
recentlyPlayed: RecentlyPlayedItem[];
accentColor: string;
showVisualizer: boolean;
showStats: boolean;
compactMode: boolean;
reducedMotion: boolean;
grayscaleMode: boolean;
squareAvatars: boolean;
highPerformanceMode: boolean;
disableGlow: boolean;
updateTitle: boolean;
}