commands/listplaylistinfo: add response type
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
DbSongInfo, Priority, SongId, SongPosition,
|
||||
commands::{Command, RequestParserError, ResponseParserError},
|
||||
common::types::{PlaylistName, WindowRange},
|
||||
request_tokenizer::RequestTokenizer,
|
||||
@@ -15,9 +16,19 @@ pub struct ListPlaylistInfoRequest {
|
||||
range: Option<WindowRange>,
|
||||
}
|
||||
|
||||
pub type ListPlaylistInfoResponse = Vec<ListPlaylistInfoResponseEntry>;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub struct ListPlaylistInfoResponseEntry {
|
||||
position: SongPosition,
|
||||
id: SongId,
|
||||
priority: Priority,
|
||||
song_info: DbSongInfo,
|
||||
}
|
||||
|
||||
impl Command for ListPlaylistInfo {
|
||||
type Request = ListPlaylistInfoRequest;
|
||||
type Response = ();
|
||||
type Response = ListPlaylistInfoResponse;
|
||||
const COMMAND: &'static str = "listplaylistinfo";
|
||||
|
||||
fn serialize_request(&self, request: Self::Request) -> String {
|
||||
|
||||
Reference in New Issue
Block a user