42 lines
1.1 KiB
Rust
42 lines
1.1 KiB
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
use crate::{
|
|
commands::{Command, CommandResponse, ResponseParserError, single_item_command_request},
|
|
response_tokenizer::ResponseAttributes,
|
|
types::{DbSongInfo, Priority, SongId, SongPosition},
|
|
};
|
|
|
|
pub struct PlaylistId;
|
|
|
|
single_item_command_request!(PlaylistId, "playlistid", SongId);
|
|
|
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
|
pub struct PlaylistIdResponse(Vec<PlaylistIdResponseEntry>);
|
|
|
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
|
pub struct PlaylistIdResponseEntry {
|
|
pub position: SongPosition,
|
|
pub id: SongId,
|
|
pub priority: Option<Priority>,
|
|
pub song_info: DbSongInfo,
|
|
}
|
|
|
|
impl CommandResponse for PlaylistIdResponse {
|
|
fn into_response_enum(self) -> crate::Response {
|
|
todo!()
|
|
}
|
|
|
|
fn from_response_enum(response: crate::Response) -> Option<Self> {
|
|
todo!()
|
|
}
|
|
|
|
fn parse(parts: ResponseAttributes<'_>) -> Result<Self, ResponseParserError> {
|
|
unimplemented!()
|
|
}
|
|
}
|
|
|
|
impl Command for PlaylistId {
|
|
type Request = PlaylistIdRequest;
|
|
type Response = PlaylistIdResponse;
|
|
}
|