Renaming to GetOtherPlaylists
This commit is contained in:
parent
7e1136acad
commit
1b31aaf549
8
dist/messageTypes.d.ts
vendored
8
dist/messageTypes.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
import { Song, PlayingSong, QueuedSong, Playlist, PlaylistDescription } from "./dataTypes";
|
||||
export type StuenMessages = ListenerLeft | ListenerList | ListenerJoined | SendChatMessage | SearchSong | SearchSongResult | Join | QueueSong | CurrentQueue | CurrentSong | UnqueueSong | ReorderSong | SkipSong | SongLikes | ToggleSongLike | CreatePlaylist | RemovePlaylist | AddSongToPlaylist | RemoveSongFromPlaylist | Playlists | GetPlaylist | PlaylistSongs | GetAllPlaylists | ToggleTag | Shuffle | RemoveFromAutoPlay;
|
||||
export type StuenMessages = ListenerLeft | ListenerList | ListenerJoined | SendChatMessage | SearchSong | SearchSongResult | Join | QueueSong | CurrentQueue | CurrentSong | UnqueueSong | ReorderSong | SkipSong | SongLikes | ToggleSongLike | CreatePlaylist | RemovePlaylist | AddSongToPlaylist | RemoveSongFromPlaylist | Playlists | GetPlaylist | PlaylistSongs | GetOtherPlaylists | ToggleTag | Shuffle | RemoveFromAutoPlay;
|
||||
export declare abstract class StuenMessage {
|
||||
type: string;
|
||||
constructor(type: string);
|
||||
@ -89,9 +89,13 @@ export declare class PlaylistSongs extends StuenMessage {
|
||||
playlist: Playlist;
|
||||
constructor(playlist: Playlist);
|
||||
}
|
||||
export declare class GetAllPlaylists extends StuenMessage {
|
||||
export declare class GetOtherPlaylists extends StuenMessage {
|
||||
constructor();
|
||||
}
|
||||
export declare class OthersPlaylists extends StuenMessage {
|
||||
playlists: PlaylistDescription[];
|
||||
constructor(playlists: PlaylistDescription[]);
|
||||
}
|
||||
export declare class AddSongToPlaylist extends StuenMessage {
|
||||
song: Song;
|
||||
playlist: string;
|
||||
|
||||
24
dist/messageTypes.js
vendored
24
dist/messageTypes.js
vendored
@ -15,7 +15,7 @@ var __extends = (this && this.__extends) || (function () {
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.RemoveFromAutoPlay = exports.Shuffle = exports.ToggleTag = exports.RemoveSongFromPlaylist = exports.AddSongToPlaylist = exports.GetAllPlaylists = exports.PlaylistSongs = exports.GetPlaylist = exports.Playlists = exports.RemovePlaylist = exports.CreatePlaylist = exports.SongLikes = exports.ToggleSongLike = exports.SkipSong = exports.ReorderSong = exports.UnqueueSong = exports.CurrentSong = exports.CurrentQueue = exports.QueueSong = exports.SearchSongResult = exports.SearchSong = exports.ChatMessage = exports.SendChatMessage = exports.ListenerList = exports.ListenerLeft = exports.ListenerJoined = exports.Join = exports.StuenMessage = void 0;
|
||||
exports.RemoveFromAutoPlay = exports.Shuffle = exports.ToggleTag = exports.RemoveSongFromPlaylist = exports.AddSongToPlaylist = exports.OthersPlaylists = exports.GetOtherPlaylists = exports.PlaylistSongs = exports.GetPlaylist = exports.Playlists = exports.RemovePlaylist = exports.CreatePlaylist = exports.SongLikes = exports.ToggleSongLike = exports.SkipSong = exports.ReorderSong = exports.UnqueueSong = exports.CurrentSong = exports.CurrentQueue = exports.QueueSong = exports.SearchSongResult = exports.SearchSong = exports.ChatMessage = exports.SendChatMessage = exports.ListenerList = exports.ListenerLeft = exports.ListenerJoined = exports.Join = exports.StuenMessage = void 0;
|
||||
var StuenMessage = /** @class */ (function () {
|
||||
function StuenMessage(type) {
|
||||
this.type = type;
|
||||
@ -233,14 +233,24 @@ var PlaylistSongs = /** @class */ (function (_super) {
|
||||
return PlaylistSongs;
|
||||
}(StuenMessage));
|
||||
exports.PlaylistSongs = PlaylistSongs;
|
||||
var GetAllPlaylists = /** @class */ (function (_super) {
|
||||
__extends(GetAllPlaylists, _super);
|
||||
function GetAllPlaylists() {
|
||||
return _super.call(this, 'GetAllPlaylists') || this;
|
||||
var GetOtherPlaylists = /** @class */ (function (_super) {
|
||||
__extends(GetOtherPlaylists, _super);
|
||||
function GetOtherPlaylists() {
|
||||
return _super.call(this, 'GetOtherPlaylists') || this;
|
||||
}
|
||||
return GetAllPlaylists;
|
||||
return GetOtherPlaylists;
|
||||
}(StuenMessage));
|
||||
exports.GetAllPlaylists = GetAllPlaylists;
|
||||
exports.GetOtherPlaylists = GetOtherPlaylists;
|
||||
var OthersPlaylists = /** @class */ (function (_super) {
|
||||
__extends(OthersPlaylists, _super);
|
||||
function OthersPlaylists(playlists) {
|
||||
var _this = _super.call(this, 'OthersPlaylists') || this;
|
||||
_this.playlists = playlists;
|
||||
return _this;
|
||||
}
|
||||
return OthersPlaylists;
|
||||
}(StuenMessage));
|
||||
exports.OthersPlaylists = OthersPlaylists;
|
||||
var AddSongToPlaylist = /** @class */ (function (_super) {
|
||||
__extends(AddSongToPlaylist, _super);
|
||||
function AddSongToPlaylist(song, playlist) {
|
||||
|
||||
2
dist/parseMessage.js
vendored
2
dist/parseMessage.js
vendored
@ -52,7 +52,7 @@ function parseMessage(message) {
|
||||
case 'RemoveSongFromPlaylist':
|
||||
return new messageTypes_1.RemoveSongFromPlaylist(data.song, data.playlist);
|
||||
case 'GetAllPlaylists':
|
||||
return new messageTypes_1.GetAllPlaylists();
|
||||
return new messageTypes_1.GetOtherPlaylists();
|
||||
case 'ToggleTag':
|
||||
return new messageTypes_1.ToggleTag(data.song, data.tag);
|
||||
case 'Shuffle':
|
||||
|
||||
@ -23,7 +23,7 @@ export type StuenMessages =
|
||||
| Playlists
|
||||
| GetPlaylist
|
||||
| PlaylistSongs
|
||||
| GetAllPlaylists
|
||||
| GetOtherPlaylists
|
||||
| ToggleTag
|
||||
| Shuffle
|
||||
| RemoveFromAutoPlay
|
||||
@ -161,12 +161,17 @@ export class PlaylistSongs extends StuenMessage {
|
||||
}
|
||||
}
|
||||
|
||||
export class GetAllPlaylists extends StuenMessage {
|
||||
export class GetOtherPlaylists extends StuenMessage {
|
||||
constructor() {
|
||||
super('GetAllPlaylists');
|
||||
super('GetOtherPlaylists');
|
||||
}
|
||||
}
|
||||
|
||||
export class OthersPlaylists extends StuenMessage {
|
||||
constructor(public playlists: PlaylistDescription[]) {
|
||||
super('OthersPlaylists');
|
||||
}
|
||||
}
|
||||
export class AddSongToPlaylist extends StuenMessage {
|
||||
constructor(public song: Song, public playlist: string) {
|
||||
super('AddSongToPlaylist');
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "stuen-common",
|
||||
"version": "1.2.14",
|
||||
"version": "1.2.15",
|
||||
"main": "dist/common.js",
|
||||
"type": "commonjs",
|
||||
"types": "dist/common.d.ts",
|
||||
|
||||
@ -11,7 +11,7 @@ import {
|
||||
ListenerList,
|
||||
Playlists,
|
||||
PlaylistSongs,
|
||||
GetAllPlaylists,
|
||||
GetOtherPlaylists,
|
||||
QueueSong, RemoveFromAutoPlay, RemovePlaylist,
|
||||
RemoveSongFromPlaylist,
|
||||
ReorderSong,
|
||||
@ -77,7 +77,7 @@ export default function parseMessage(message: string): StuenMessage | null {
|
||||
case 'RemoveSongFromPlaylist':
|
||||
return new RemoveSongFromPlaylist(data.song, data.playlist);
|
||||
case 'GetAllPlaylists':
|
||||
return new GetAllPlaylists();
|
||||
return new GetOtherPlaylists();
|
||||
case 'ToggleTag':
|
||||
return new ToggleTag(data.song, data.tag);
|
||||
case 'Shuffle':
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user