Moved tags to song instead of on playing song

This commit is contained in:
Torben Pi Jensen
2026-05-09 11:23:46 +02:00
parent 5211a4a976
commit 9b4103a8b2
3 changed files with 15 additions and 15 deletions
+5 -5
View File
@@ -5,20 +5,20 @@ export enum SongType {
export class Song { 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 { export class QueuedSong extends Song {
constructor(type: SongType, title: string, songId: string, image: string, public listener: string, public inAutoPlay: boolean) { constructor(type: SongType, title: string, songId: string, image: string, tags: string[], public listener: string, public inAutoPlay: boolean) {
super(type, title, songId, image, inAutoPlay); super(type, title, songId, image, tags, inAutoPlay);
} }
} }
export class PlayingSong extends QueuedSong { 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) { 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, listener, inAutoPlay); super(type, title, songId, image, tags, listener, inAutoPlay);
} }
} }
+4 -4
View File
@@ -7,20 +7,20 @@ export declare class Song {
title: string; title: string;
songId: string; songId: string;
image: string; image: string;
tags: string[];
inAutoPlay: boolean; 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 { export declare class QueuedSong extends Song {
listener: string; listener: string;
inAutoPlay: boolean; 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 { export declare class PlayingSong extends QueuedSong {
length: number; length: number;
position: number; position: number;
tags: string[];
inAutoPlay: boolean; 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 { export declare class Playlist {
title: string; title: string;
+6 -6
View File
@@ -22,11 +22,12 @@ var SongType;
SongType[SongType["Spotify"] = 1] = "Spotify"; SongType[SongType["Spotify"] = 1] = "Spotify";
})(SongType || (exports.SongType = SongType = {})); })(SongType || (exports.SongType = SongType = {}));
var Song = /** @class */ (function () { var Song = /** @class */ (function () {
function Song(type, title, songId, image, inAutoPlay) { function Song(type, title, songId, image, tags, inAutoPlay) {
this.type = type; this.type = type;
this.title = title; this.title = title;
this.songId = songId; this.songId = songId;
this.image = image; this.image = image;
this.tags = tags;
this.inAutoPlay = inAutoPlay; this.inAutoPlay = inAutoPlay;
} }
return Song; return Song;
@@ -34,8 +35,8 @@ var Song = /** @class */ (function () {
exports.Song = Song; exports.Song = Song;
var QueuedSong = /** @class */ (function (_super) { var QueuedSong = /** @class */ (function (_super) {
__extends(QueuedSong, _super); __extends(QueuedSong, _super);
function QueuedSong(type, title, songId, image, listener, inAutoPlay) { function QueuedSong(type, title, songId, image, tags, listener, inAutoPlay) {
var _this = _super.call(this, type, title, songId, image, inAutoPlay) || this; var _this = _super.call(this, type, title, songId, image, tags, inAutoPlay) || this;
_this.listener = listener; _this.listener = listener;
_this.inAutoPlay = inAutoPlay; _this.inAutoPlay = inAutoPlay;
return _this; return _this;
@@ -45,11 +46,10 @@ var QueuedSong = /** @class */ (function (_super) {
exports.QueuedSong = QueuedSong; exports.QueuedSong = QueuedSong;
var PlayingSong = /** @class */ (function (_super) { var PlayingSong = /** @class */ (function (_super) {
__extends(PlayingSong, _super); __extends(PlayingSong, _super);
function PlayingSong(type, title, songId, image, listener, length, position, tags, inAutoPlay) { function PlayingSong(type, title, songId, image, tags, listener, length, position, inAutoPlay) {
var _this = _super.call(this, type, title, songId, image, listener, inAutoPlay) || this; var _this = _super.call(this, type, title, songId, image, tags, listener, inAutoPlay) || this;
_this.length = length; _this.length = length;
_this.position = position; _this.position = position;
_this.tags = tags;
_this.inAutoPlay = inAutoPlay; _this.inAutoPlay = inAutoPlay;
return _this; return _this;
} }