78 lines
2.9 KiB
JavaScript
78 lines
2.9 KiB
JavaScript
"use strict";
|
|
var __extends = (this && this.__extends) || (function () {
|
|
var extendStatics = function (d, b) {
|
|
extendStatics = Object.setPrototypeOf ||
|
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
return extendStatics(d, b);
|
|
};
|
|
return function (d, b) {
|
|
if (typeof b !== "function" && b !== null)
|
|
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
extendStatics(d, b);
|
|
function __() { this.constructor = d; }
|
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
};
|
|
})();
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.PlaylistDescription = exports.Playlist = exports.PlayingSong = exports.QueuedSong = exports.Song = exports.SongType = void 0;
|
|
var SongType;
|
|
(function (SongType) {
|
|
SongType[SongType["YouTube"] = 0] = "YouTube";
|
|
SongType[SongType["Spotify"] = 1] = "Spotify";
|
|
})(SongType || (exports.SongType = SongType = {}));
|
|
var Song = /** @class */ (function () {
|
|
function Song(type, title, songId, image, inAutoPlay) {
|
|
this.type = type;
|
|
this.title = title;
|
|
this.songId = songId;
|
|
this.image = image;
|
|
this.inAutoPlay = inAutoPlay;
|
|
}
|
|
return Song;
|
|
}());
|
|
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;
|
|
_this.listener = listener;
|
|
_this.inAutoPlay = inAutoPlay;
|
|
return _this;
|
|
}
|
|
return QueuedSong;
|
|
}(Song));
|
|
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;
|
|
_this.length = length;
|
|
_this.position = position;
|
|
_this.tags = tags;
|
|
_this.inAutoPlay = inAutoPlay;
|
|
return _this;
|
|
}
|
|
return PlayingSong;
|
|
}(QueuedSong));
|
|
exports.PlayingSong = PlayingSong;
|
|
var Playlist = /** @class */ (function () {
|
|
function Playlist(title, listener, type, songs) {
|
|
this.title = title;
|
|
this.listener = listener;
|
|
this.type = type;
|
|
this.songs = songs;
|
|
}
|
|
return Playlist;
|
|
}());
|
|
exports.Playlist = Playlist;
|
|
var PlaylistDescription = /** @class */ (function () {
|
|
function PlaylistDescription(title, listener, type) {
|
|
this.title = title;
|
|
this.listener = listener;
|
|
this.type = type;
|
|
}
|
|
return PlaylistDescription;
|
|
}());
|
|
exports.PlaylistDescription = PlaylistDescription;
|