Allow load/remove commands to take multiple entries at once

This commit is contained in:
2024-12-23 13:08:17 +01:00
parent 48f03354d3
commit 8fa9c0b762
2 changed files with 8 additions and 10 deletions

View File

@@ -52,11 +52,11 @@ class Command extends PlayerConnectionEvent {
// );
// }
factory Command.load(String url) {
factory Command.load(List<String> urls) {
return Command(
type: 'load',
value: {
'url': url,
'urls': urls,
},
);
}
@@ -116,11 +116,11 @@ class Command extends PlayerConnectionEvent {
);
}
factory Command.playlistRemove(int position) {
factory Command.playlistRemove(List<int> positions) {
return Command(
type: 'playlist_remove',
value: {
'position': position,
'positions': positions,
},
);
}