common/dataTypes.ts
2024-05-04 17:31:58 +02:00

34 lines
1.0 KiB
TypeScript

export enum SongType {
YouTube,
Spotify
}
export class Song {
constructor(public type: SongType, public title: string, public songId: string, public image: string, public inAutoPlay: boolean) {
}
}
export class QueuedSong extends Song {
constructor(type: SongType, title: string, songId: string, image: string, public listener: string, public inAutoPlay: boolean) {
super(type, title, songId, image, inAutoPlay);
}
}
export class PlayingSong extends QueuedSong {
constructor(type: SongType, title: string, songId: string, image: string, listener: string, public length: number, public position: number, public tags: string[], public inAutoPlay: boolean) {
super(type, title, songId, image, listener, inAutoPlay);
}
}
export class Playlist {
constructor(public title: string, public listener: string, public type: SongType, public songs: Song[]) {
}
}
export class PlaylistDescription {
constructor(public title: string, public listener: string, public type: SongType) {
}
}