43 lines
1.4 KiB
TypeScript
43 lines
1.4 KiB
TypeScript
export enum SongType {
|
|
YouTube,
|
|
Spotify
|
|
}
|
|
|
|
|
|
export class Song {
|
|
constructor(public type: SongType, public title: string, public songId: string, public image: string, public tags: string[], public inAutoPlay: boolean, public plays: number, public cutOff: number | null) {
|
|
|
|
}
|
|
}
|
|
|
|
export class QueuedSong extends Song {
|
|
constructor(type: SongType, title: string, songId: string, image: string, tags: string[], public listener: string, public inAutoPlay: boolean, public plays: number, public cutOff: number | null) {
|
|
super(type, title, songId, image, tags, inAutoPlay, plays, cutOff);
|
|
}
|
|
}
|
|
|
|
export class PlayingSong extends QueuedSong {
|
|
constructor(type: SongType, title: string, songId: string, image: string, tags: string[], listener: string, public inAutoPlay: boolean, public plays: number, public cutOff: number | null) {
|
|
super(type, title, songId, image, tags, listener, inAutoPlay, plays, cutOff);
|
|
}
|
|
}
|
|
|
|
export class PlayerControl {
|
|
constructor(public type: SongType, public songId: string, public position: number, public length: number) {
|
|
}
|
|
}
|
|
|
|
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) {
|
|
}
|
|
}
|
|
|
|
export class TagFrequency {
|
|
constructor(public tag: string, public frequency: number) {
|
|
}
|
|
} |