Add plays, cutoff, tagfrequency messages

This commit is contained in:
Torben Pi Jensen
2026-05-09 15:43:35 +02:00
parent 84ceaeb169
commit 77dc0c19ee
12 changed files with 111 additions and 23 deletions
+10 -5
View File
@@ -5,20 +5,20 @@ export enum SongType {
export class Song {
constructor(public type: SongType, public title: string, public songId: string, public image: string, public tags: string[], public inAutoPlay: boolean) {
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) {
super(type, title, songId, image, tags, inAutoPlay);
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) {
super(type, title, songId, image, tags, listener, inAutoPlay);
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);
}
}
@@ -36,3 +36,8 @@ export class PlaylistDescription {
constructor(public title: string, public listener: string, public type: SongType) {
}
}
export class TagFrequency {
constructor(public tag: string, public frequency: number) {
}
}