diff --git a/src/commands/music_database/albumart.rs b/src/commands/music_database/albumart.rs index d8313d34..ad977ae4 100644 --- a/src/commands/music_database/albumart.rs +++ b/src/commands/music_database/albumart.rs @@ -1,5 +1,7 @@ use std::collections::HashMap; +use serde::{Deserialize, Serialize}; + use crate::{ commands::{ Command, Request, RequestParserError, RequestParserResult, ResponseAttributes, @@ -10,6 +12,7 @@ use crate::{ pub struct AlbumArt; +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct AlbumArtResponse { pub size: usize, pub binary: Vec, diff --git a/src/commands/music_database/count.rs b/src/commands/music_database/count.rs index 00bb1312..4de8833e 100644 --- a/src/commands/music_database/count.rs +++ b/src/commands/music_database/count.rs @@ -1,5 +1,7 @@ use std::collections::HashMap; +use serde::{Deserialize, Serialize}; + use crate::{ commands::{ Command, Request, RequestParserError, RequestParserResult, ResponseAttributes, @@ -10,6 +12,7 @@ use crate::{ pub struct Count; +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct CountResponse { pub songs: usize, pub playtime: u64, diff --git a/src/commands/music_database/find.rs b/src/commands/music_database/find.rs index 4ce5cd66..48c68521 100644 --- a/src/commands/music_database/find.rs +++ b/src/commands/music_database/find.rs @@ -1,3 +1,5 @@ +use serde::{Deserialize, Serialize}; + use crate::{ commands::{ Command, Request, RequestParserError, RequestParserResult, ResponseAttributes, @@ -8,6 +10,7 @@ use crate::{ pub struct Find; +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct FindResponse {} impl Command for Find { diff --git a/src/commands/music_database/getfingerprint.rs b/src/commands/music_database/getfingerprint.rs index 4dfaf606..7e33fbfc 100644 --- a/src/commands/music_database/getfingerprint.rs +++ b/src/commands/music_database/getfingerprint.rs @@ -1,5 +1,7 @@ use std::collections::HashMap; +use serde::{Deserialize, Serialize}; + use crate::commands::{ Command, Request, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError, get_and_parse_property, @@ -7,6 +9,7 @@ use crate::commands::{ pub struct GetFingerprint; +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct GetFingerprintResponse { pub chromaprint: String, } diff --git a/src/commands/music_database/readpicture.rs b/src/commands/music_database/readpicture.rs index 86babc7f..ca25957b 100644 --- a/src/commands/music_database/readpicture.rs +++ b/src/commands/music_database/readpicture.rs @@ -1,5 +1,7 @@ use std::collections::HashMap; +use serde::{Deserialize, Serialize}; + use crate::{ commands::{ Command, Request, RequestParserError, RequestParserResult, ResponseAttributes, @@ -10,6 +12,7 @@ use crate::{ pub struct ReadPicture; +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ReadPictureResponse { pub size: usize, pub binary: Vec, diff --git a/src/commands/music_database/rescan.rs b/src/commands/music_database/rescan.rs index 94022bfb..5c186a2a 100644 --- a/src/commands/music_database/rescan.rs +++ b/src/commands/music_database/rescan.rs @@ -1,5 +1,7 @@ use std::collections::HashMap; +use serde::{Deserialize, Serialize}; + use crate::commands::{ Command, Request, RequestParserResult, ResponseAttributes, ResponseParserError, get_and_parse_property, @@ -7,6 +9,7 @@ use crate::commands::{ pub struct Rescan; +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct RescanResponse { pub updating_db: usize, } diff --git a/src/commands/music_database/search.rs b/src/commands/music_database/search.rs index fe7bcdc4..51d121a1 100644 --- a/src/commands/music_database/search.rs +++ b/src/commands/music_database/search.rs @@ -1,3 +1,5 @@ +use serde::{Deserialize, Serialize}; + use crate::{ commands::{ Command, Request, RequestParserError, RequestParserResult, ResponseAttributes, @@ -8,6 +10,7 @@ use crate::{ pub struct Search; +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SearchResponse {} impl Command for Search { diff --git a/src/commands/music_database/searchcount.rs b/src/commands/music_database/searchcount.rs index be481f9a..bc4cf085 100644 --- a/src/commands/music_database/searchcount.rs +++ b/src/commands/music_database/searchcount.rs @@ -1,5 +1,7 @@ use std::collections::HashMap; +use serde::{Deserialize, Serialize}; + use crate::{ commands::{ Command, Request, RequestParserError, RequestParserResult, ResponseAttributes, @@ -10,6 +12,7 @@ use crate::{ pub struct SearchCount; +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SearchCountResponse { pub songs: usize, pub playtime: u64, diff --git a/src/commands/music_database/update.rs b/src/commands/music_database/update.rs index dd1406e9..d07d797e 100644 --- a/src/commands/music_database/update.rs +++ b/src/commands/music_database/update.rs @@ -1,5 +1,7 @@ use std::collections::HashMap; +use serde::{Deserialize, Serialize}; + use crate::commands::{ Command, Request, RequestParserResult, ResponseAttributes, ResponseParserError, get_and_parse_property, @@ -7,6 +9,7 @@ use crate::commands::{ pub struct Update; +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct UpdateResponse { updating_db: usize, } diff --git a/src/commands/queue/addid.rs b/src/commands/queue/addid.rs index 2701d170..fe708d6f 100644 --- a/src/commands/queue/addid.rs +++ b/src/commands/queue/addid.rs @@ -1,3 +1,5 @@ +use serde::{Deserialize, Serialize}; + use crate::{ commands::{ Command, Request, RequestParserError, RequestParserResult, ResponseAttributes, @@ -8,6 +10,7 @@ use crate::{ pub struct AddId; +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct AddIdResponse { pub id: SongId, } diff --git a/src/commands/reflection/config.rs b/src/commands/reflection/config.rs index 45fd61a3..d012ea2c 100644 --- a/src/commands/reflection/config.rs +++ b/src/commands/reflection/config.rs @@ -1,5 +1,7 @@ use std::collections::HashMap; +use serde::{Deserialize, Serialize}; + use crate::commands::{ Command, Request, RequestParserResult, ResponseAttributes, ResponseParserError, get_and_parse_property, get_property, @@ -7,6 +9,7 @@ use crate::commands::{ pub struct Config; +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ConfigResponse { pub music_directory: String, pub playlist_directory: String, diff --git a/src/commands/stickers/sticker_find.rs b/src/commands/stickers/sticker_find.rs index 5f019359..87c64dba 100644 --- a/src/commands/stickers/sticker_find.rs +++ b/src/commands/stickers/sticker_find.rs @@ -1,3 +1,5 @@ +use serde::{Deserialize, Serialize}; + use crate::commands::{ Command, GenericResponseValue, Request, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError, @@ -5,6 +7,7 @@ use crate::commands::{ pub struct StickerFind; +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct StickerFindResponseEntry { pub uri: String, pub name: String, diff --git a/src/commands/stored_playlists/playlistlength.rs b/src/commands/stored_playlists/playlistlength.rs index a66dcdc2..9ff541d9 100644 --- a/src/commands/stored_playlists/playlistlength.rs +++ b/src/commands/stored_playlists/playlistlength.rs @@ -1,5 +1,7 @@ use std::collections::HashMap; +use serde::{Deserialize, Serialize}; + use crate::commands::{ Command, Request, RequestParserError, RequestParserResult, ResponseAttributes, ResponseParserError, get_and_parse_property, @@ -7,6 +9,7 @@ use crate::commands::{ pub struct PlaylistLength; +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct PlaylistLengthResponse { pub songs: u64, pub playtime: u64,