commands/listplaylistinfo: add response type

This commit is contained in:
2025-12-07 21:33:01 +09:00
parent c811094908
commit fc5cbe8024

View File

@@ -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 {