From 9b4103a8b21b056b1836974eee52961093b1d571 Mon Sep 17 00:00:00 2001 From: Torben Pi Jensen Date: Sat, 9 May 2026 11:23:46 +0200 Subject: [PATCH] Moved tags to song instead of on playing song --- dataTypes.ts | 10 +++++----- dist/dataTypes.d.ts | 8 ++++---- dist/dataTypes.js | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dataTypes.ts b/dataTypes.ts index f080b9f..42a6e57 100644 --- a/dataTypes.ts +++ b/dataTypes.ts @@ -5,20 +5,20 @@ export enum SongType { export class Song { - constructor(public type: SongType, public title: string, public songId: string, public image: string, public inAutoPlay: boolean) { + constructor(public type: SongType, public title: string, public songId: string, public image: string, public tags: 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); + constructor(type: SongType, title: string, songId: string, image: string, tags: string[], public listener: string, public inAutoPlay: boolean) { + super(type, title, songId, image, tags, 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); + constructor(type: SongType, title: string, songId: string, image: string, tags: string[], listener: string, public length: number, public position: number, public inAutoPlay: boolean) { + super(type, title, songId, image, tags, listener, inAutoPlay); } } diff --git a/dist/dataTypes.d.ts b/dist/dataTypes.d.ts index 210df09..5afe7f6 100644 --- a/dist/dataTypes.d.ts +++ b/dist/dataTypes.d.ts @@ -7,20 +7,20 @@ export declare class Song { title: string; songId: string; image: string; + tags: string[]; inAutoPlay: boolean; - constructor(type: SongType, title: string, songId: string, image: string, inAutoPlay: boolean); + constructor(type: SongType, title: string, songId: string, image: string, tags: string[], inAutoPlay: boolean); } export declare class QueuedSong extends Song { listener: string; inAutoPlay: boolean; - constructor(type: SongType, title: string, songId: string, image: string, listener: string, inAutoPlay: boolean); + constructor(type: SongType, title: string, songId: string, image: string, tags: string[], listener: string, inAutoPlay: boolean); } export declare class PlayingSong extends QueuedSong { length: number; position: number; - tags: string[]; inAutoPlay: boolean; - constructor(type: SongType, title: string, songId: string, image: string, listener: string, length: number, position: number, tags: string[], inAutoPlay: boolean); + constructor(type: SongType, title: string, songId: string, image: string, tags: string[], listener: string, length: number, position: number, inAutoPlay: boolean); } export declare class Playlist { title: string; diff --git a/dist/dataTypes.js b/dist/dataTypes.js index b1ae40a..f758a5a 100644 --- a/dist/dataTypes.js +++ b/dist/dataTypes.js @@ -22,11 +22,12 @@ var SongType; SongType[SongType["Spotify"] = 1] = "Spotify"; })(SongType || (exports.SongType = SongType = {})); var Song = /** @class */ (function () { - function Song(type, title, songId, image, inAutoPlay) { + function Song(type, title, songId, image, tags, inAutoPlay) { this.type = type; this.title = title; this.songId = songId; this.image = image; + this.tags = tags; this.inAutoPlay = inAutoPlay; } return Song; @@ -34,8 +35,8 @@ var Song = /** @class */ (function () { exports.Song = Song; var QueuedSong = /** @class */ (function (_super) { __extends(QueuedSong, _super); - function QueuedSong(type, title, songId, image, listener, inAutoPlay) { - var _this = _super.call(this, type, title, songId, image, inAutoPlay) || this; + function QueuedSong(type, title, songId, image, tags, listener, inAutoPlay) { + var _this = _super.call(this, type, title, songId, image, tags, inAutoPlay) || this; _this.listener = listener; _this.inAutoPlay = inAutoPlay; return _this; @@ -45,11 +46,10 @@ var QueuedSong = /** @class */ (function (_super) { exports.QueuedSong = QueuedSong; var PlayingSong = /** @class */ (function (_super) { __extends(PlayingSong, _super); - function PlayingSong(type, title, songId, image, listener, length, position, tags, inAutoPlay) { - var _this = _super.call(this, type, title, songId, image, listener, inAutoPlay) || this; + function PlayingSong(type, title, songId, image, tags, listener, length, position, inAutoPlay) { + var _this = _super.call(this, type, title, songId, image, tags, listener, inAutoPlay) || this; _this.length = length; _this.position = position; - _this.tags = tags; _this.inAutoPlay = inAutoPlay; return _this; }