Added playlist
This commit is contained in:
+18
-5
@@ -1,4 +1,4 @@
|
||||
import {Song, PlayingSong, QueuedSong, Playlist} from "./dataTypes";
|
||||
import {Song, PlayingSong, QueuedSong, Playlist, PlaylistDescription} from "./dataTypes";
|
||||
|
||||
export type StuenMessages =
|
||||
ListenerLeft
|
||||
@@ -15,11 +15,13 @@ export type StuenMessages =
|
||||
| ReorderSong
|
||||
| SkipSong
|
||||
| SongLikes
|
||||
| CreatePlaylist
|
||||
| ToggleSongLike
|
||||
| CreatePlaylist
|
||||
| AddSongToPlaylist
|
||||
| RemoveSongFromPlaylist
|
||||
| Playlists;
|
||||
| Playlists
|
||||
| GetPlaylist
|
||||
| PlaylistSongs
|
||||
|
||||
export abstract class StuenMessage {
|
||||
constructor(public type: string) {
|
||||
@@ -132,11 +134,22 @@ export class CreatePlaylist extends StuenMessage {
|
||||
}
|
||||
|
||||
export class Playlists extends StuenMessage {
|
||||
constructor(public playlists: Playlist[]) {
|
||||
constructor(public playlists: PlaylistDescription[]) {
|
||||
super('Playlists');
|
||||
}
|
||||
}
|
||||
|
||||
export class GetPlaylist extends StuenMessage {
|
||||
constructor(public playlist: PlaylistDescription) {
|
||||
super('GetPlaylist');
|
||||
}
|
||||
}
|
||||
export class PlaylistSongs extends StuenMessage {
|
||||
constructor(public playlist: Playlist) {
|
||||
super('PlaylistSongs');
|
||||
}
|
||||
}
|
||||
|
||||
export class AddSongToPlaylist extends StuenMessage {
|
||||
constructor(public song: Song, public playlist: string) {
|
||||
super('AddSongToPlaylist');
|
||||
@@ -145,6 +158,6 @@ export class AddSongToPlaylist extends StuenMessage {
|
||||
|
||||
export class RemoveSongFromPlaylist extends StuenMessage {
|
||||
constructor(public song: Song, public playlist: string) {
|
||||
super('RemoveSongToPlaylist');
|
||||
super('RemoveSongFromPlaylist');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user