Added inAutoPlay property to songs

This commit is contained in:
Thomas Viesmose Birch 2024-05-04 12:31:30 +02:00
parent 283d7ea4ec
commit 00dedc1d85
3 changed files with 15 additions and 9 deletions

9
dist/dataTypes.d.ts vendored
View File

@ -7,17 +7,20 @@ export declare class Song {
title: string; title: string;
songId: string; songId: string;
image: string; image: string;
constructor(type: SongType, title: string, songId: string, image: string); inAutoPlay: boolean;
constructor(type: SongType, title: string, songId: string, image: string, inAutoPlay: boolean);
} }
export declare class QueuedSong extends Song { export declare class QueuedSong extends Song {
listener: string; listener: string;
constructor(type: SongType, title: string, songId: string, image: string, listener: string); inAutoPlay: boolean;
constructor(type: SongType, title: string, songId: string, image: 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[]; tags: string[];
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, listener: string, length: number, position: number, tags: string[], inAutoPlay: boolean);
} }
export declare class Playlist { export declare class Playlist {
title: string; title: string;

13
dist/dataTypes.js vendored
View File

@ -22,20 +22,22 @@ 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) { function Song(type, title, songId, image, 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.inAutoPlay = inAutoPlay;
} }
return Song; return Song;
}()); }());
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) { function QueuedSong(type, title, songId, image, listener, inAutoPlay) {
var _this = _super.call(this, type, title, songId, image) || this; var _this = _super.call(this, type, title, songId, image, inAutoPlay) || this;
_this.listener = listener; _this.listener = listener;
_this.inAutoPlay = inAutoPlay;
return _this; return _this;
} }
return QueuedSong; return QueuedSong;
@ -43,11 +45,12 @@ 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) { function PlayingSong(type, title, songId, image, listener, length, position, tags, inAutoPlay) {
var _this = _super.call(this, type, title, songId, image, listener) || this; var _this = _super.call(this, type, title, songId, image, listener, inAutoPlay) || this;
_this.length = length; _this.length = length;
_this.position = position; _this.position = position;
_this.tags = tags; _this.tags = tags;
_this.inAutoPlay = inAutoPlay;
return _this; return _this;
} }
return PlayingSong; return PlayingSong;

View File

@ -1,6 +1,6 @@
{ {
"name": "stuen-common", "name": "stuen-common",
"version": "1.2.11", "version": "1.2.12",
"main": "dist/common.js", "main": "dist/common.js",
"type": "commonjs", "type": "commonjs",
"types": "dist/common.d.ts", "types": "dist/common.d.ts",