Fix compilation error without client-api feature

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/4/head
trivernis 3 years ago
parent 32492afedf
commit 2ac8cd165b

@ -1,6 +1,6 @@
[package] [package]
name = "mediarepo-api" name = "mediarepo-api"
version = "0.5.0" version = "0.5.1"
edition = "2018" edition = "2018"
license = "gpl-3" license = "gpl-3"

@ -2,8 +2,8 @@ use crate::client_api::error::ApiResult;
use crate::client_api::IPCApi; use crate::client_api::IPCApi;
use crate::types::files::{ use crate::types::files::{
FileMetadataResponse, FindFilesByTagsRequest, GetFileThumbnailOfSizeRequest, FileMetadataResponse, FindFilesByTagsRequest, GetFileThumbnailOfSizeRequest,
GetFileThumbnailsRequest, ReadFileRequest, SortKey, TagQuery, ThumbnailFullResponse, GetFileThumbnailsRequest, ReadFileRequest, SortKey, TagQuery, ThumbnailMetadataResponse,
ThumbnailMetadataResponse, UpdateFileNameRequest, UpdateFileNameRequest,
}; };
use crate::types::identifier::FileIdentifier; use crate::types::identifier::FileIdentifier;
use async_trait::async_trait; use async_trait::async_trait;
@ -107,7 +107,7 @@ where
min_size: (u32, u32), min_size: (u32, u32),
max_size: (u32, u32), max_size: (u32, u32),
) -> ApiResult<(ThumbnailMetadataResponse, Vec<u8>)> { ) -> ApiResult<(ThumbnailMetadataResponse, Vec<u8>)> {
let payload: ThumbnailFullResponse = self let payload: TandemPayload<ThumbnailMetadataResponse, BytePayload> = self
.emit_and_get( .emit_and_get(
"get_thumbnail_of_size", "get_thumbnail_of_size",
GetFileThumbnailOfSizeRequest { GetFileThumbnailOfSizeRequest {

@ -1,6 +1,5 @@
use crate::types::identifier::FileIdentifier; use crate::types::identifier::FileIdentifier;
use chrono::NaiveDateTime; use chrono::NaiveDateTime;
use rmp_ipc::payload::{BytePayload, TandemPayload};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Serialize, Deserialize)] #[derive(Clone, Debug, Serialize, Deserialize)]
@ -101,5 +100,3 @@ pub struct UpdateFileNameRequest {
pub file_id: FileIdentifier, pub file_id: FileIdentifier,
pub name: String, pub name: String,
} }
pub type ThumbnailFullResponse = TandemPayload<ThumbnailMetadataResponse, BytePayload>;

Loading…
Cancel
Save